-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
only every other line of config file is parsed #4
Comments
Edit: Midi remapping CC0 does work, but only seems to begin on line 3. For example:
will remap 1>11, but
will not remap CC1 |
debug:
config:
seems like it's only reading every other line? |
@v1s1n hi there! Hm... There might be an issue with linefeeds or something like that in your config. The code is quite (very) stupid when parsing. It uses fscanf which is not recommended, nor good :) And it expects lines to end with \n and only \n. Is your config file MS-DOS/Windows encoded? |
No, they are encoded in plain ascii.
I did a little more testing. When the lines between are blank, it treats them as whitespace as expected. However, when I put note:note mappings in those spaces (1:1, 2:2, etc.) then they are not parsed, but all of my CC mappings are.
and so on. my config file is:
when i remove line 3 (0:0) then only the note mappings are parsed, again following every other line. Interestingly, though, my very last line (9>19) is parsed
et cetera:
I'll do more testing, but it definitely seems like only the even-numbered mapping lines are being parsed, apart from the last one. |
I had problems that no from or to Notes nor the commandtype c gets recognized from the config file, so i checked the code. First of all the line_number 2 of the config file holds the port name. So you have to fill a name in the second line, which is send to jack for identification. In my case the the errors begun with the first line, which happened also with the shipped m2m config files.
But then i saw the same problem, that every second line gets skipped. That's because of the checking for the channel parameter. When there is no fourth parameter channel given, the fscanf line is called a second time resulting in skipping of the first reading!
|
I cloned your repo yesterday, as i am trying to use my library_of_the_extreme MIDI files from the SuperiorDrummer together with Ardour and Helix. The notes were wrong and a came along your Software searching around. Exactly what i need for this, so i hacked it to work. That's the great thing about opensource. Had not already tested that it sounds like it should, but i can see that the in/out ports appeared in Jack. Will test it this evening. Thank you! |
@Java-Jim haha, I see my good old friend @ascallonisi have a branch that fixes this shit a bit nicer, have a looksie on the ale_note2cc_dev branch. Way more elegantish error handling there, it seems. FOUR YEARS AGO :D Hehe sigh. This is mainly a hack we've been using in our studios for tinkering and for a RaspberryPi USB<->MIDI thing for forest improvisations... I think I made it originally to play SID drums with my Roland TD-9 :D, and translate an Event EzBus transport (CC) to Jack-Transport. |
At the moment, remapping CC 0 to any other CC will instead output CC 0. Tested on version 1.3.0 using jack 1.9.17, bridging with a2j.
The text was updated successfully, but these errors were encountered: