Re: can I set panning in midi
Karl Hammar: David Kastrup: k...@aspodata.se (Karl Hammar) writes: I can set midi instrument with e.g. [...] but can I set where in the stereo left-right sound picture the sound will be placed ? No. ... http://home.roadrunner.com/~jgglatt/tech/midispec/pan.htm mentions pan, perhaps this is fixable. I'm trying to make \score { \unfoldRepeats %\articulate \set Score.midiInstrument = #electric bass (finger) % 34 \new ChoirStaff \new Staff { \set Staff.midiPan = #90 \context Voice = Vs { \fmks } } \new Staff { \set Staff.midiPan = #30 \context Voice = Va { \fmka } } \new Staff { \set Staff.midiPan = #-30 \context Voice = Vt { \fmkt } } \new Staff { \set Staff.midiPan = #-90 \context Voice = Vb { \fmkb } } \midi { \tempo 4 = 108 } } to work. Getting from .ly file to c++ was easy, but how do I get the pan-setting down to midi ? My current try is http://turkos.aspodata.se/tmp/pan.diff and my guess is that somehow Staff_performer::acknowledge_audio_element is run, which adds things to the audio_staff. Then, somehow something from midi-chunk.cc is run. Soo, how far off from reality am I? Regards, /Karl Hammar --- Aspö Data Lilla Aspö 148 S-742 94 Östhammar Sweden +46 173 140 57 ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: can I set panning in midi
k...@aspodata.se (Karl Hammar) writes: Karl Hammar: David Kastrup: k...@aspodata.se (Karl Hammar) writes: I can set midi instrument with e.g. [...] but can I set where in the stereo left-right sound picture the sound will be placed ? No. ... http://home.roadrunner.com/~jgglatt/tech/midispec/pan.htm mentions pan, perhaps this is fixable. Getting from .ly file to c++ was easy, but how do I get the pan-setting down to midi ? My current try is http://turkos.aspodata.se/tmp/pan.diff and my guess is that somehow Staff_performer::acknowledge_audio_element is run, which adds things to the audio_staff. Then, somehow something from midi-chunk.cc is run. Soo, how far off from reality am I? You should probably check with the available documentation for our Midi code. Last time I checked, the available documentation was called Jan and lived in the Netherlands. -- David Kastrup ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: can I set panning in midi
David Kastrup writes: k...@aspodata.se (Karl Hammar) writes: Karl Hammar: David Kastrup: k...@aspodata.se (Karl Hammar) writes: Soo, how far off from reality am I? You should probably check with the available documentation for our Midi code. Last time I checked, the available documentation was called Jan and lived in the Netherlands. Hah. It seems that you're doing something not unlike setting the staff's instrument name, eg. Maybe you can learn from that. How does the Audio_pan get into the staff, where are you announcing the Audio_pan element? Greetings, Jan -- Jan Nieuwenhuizen jann...@gnu.org | GNU LilyPond http://lilypond.org Freelance IT http://JoyofSource.com | Avatar® http://AvatarAcademy.nl ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: can I set panning in midi
Jan Nieuwenhiuzen: David Kastrup writes: k...@aspodata.se (Karl Hammar) writes: Karl Hammar: David Kastrup: k...@aspodata.se (Karl Hammar) writes: Soo, how far off from reality am I? You should probably check with the available documentation for our Midi code. Last time I checked, the available documentation was called Jan and lived in the Netherlands. Hah. It seems that you're doing something not unlike setting the staff's instrument name, eg. Maybe you can learn from that. How does the Audio_pan get into the staff, where are you announcing the Audio_pan element? Not the faintest idéa, that is for the exciting continuation tomorrow! Regards, /Karl Hammar --- Aspö Data Lilla Aspö 148 S-742 94 Östhammar Sweden +46 173 140 57 ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: can I set panning in midi
Vaughan McAlley: On 6 September 2013 08:50, Karl Hammar k...@aspodata.se wrote: ... For which purposes do You want to use midi? Producing exercise sound files for the choir, they basically wants mp3's or something similar. I have tried ogg but their systems kind of not understands that. I'd like to have e.g. basses at left, tenors mid left, altos mid right and sopranos at right, to make each voice easier to hear and follow. ... I wrote the attached script for exactly this purpose. It saves mucking around with anything more sophisticated than a simple MIDI player. The tracks are distributed evenly across the panning range. Unfortunately it requires Lua, but Lua is small and the last few times I’ve found it very easy to install. More detailed instructions are in the script... For some reason it produces a exact copy of the input file: $ lua -v Lua 5.2.1 Copyright (C) 1994-2012 Lua.org, PUC-Rio $ lua ~/panning.lua 2b_choer.midi zz.midi 2b_choer.midi zz.midi $ lsl 2b_choer.midi zz.midi -rw-r--r-- 1 karl users 2995 2013-09-05 21:39 2b_choer.midi -rw-r--r-- 1 karl users 2995 2013-09-06 08:58 zz.midi $ md5sum 2b_choer.midi zz.midi 203528cd285a0e7438886c9c893d6490 2b_choer.midi 203528cd285a0e7438886c9c893d6490 zz.midi $ Regards, /Karl Hammar --- Aspö Data Lilla Aspö 148 S-742 94 Östhammar Sweden +46 173 140 57 ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: can I set panning in midi
Luis Jure: ... i don't bother with jack or any audio output in rosegarden, i just use it for some basic editing of midi files, and then render with timidity. Ok. i just tried editing a midi file with several tracks, and inserting a control event (control 10) in each track was easy and it worked. you have to open the event editor for each track, and then insert event from the menu. it should just work... Ok, seems simple enough inserting control-event-10 at time 0 with values 0 42 84 and 127 export why doesn't theese modern toolkits respect current directory why cannot it handle dirs with utf8 chars in the name timidity -Oj -ik ~/zz.midi trying differnt values, cannot find something that spreads evenly, it's either right or left, and the process is very tedious... Sorry, I'm not up to speed on midi nor rosegarden... Regards, /Karl Hammar --- Aspö Data Lilla Aspö 148 S-742 94 Östhammar Sweden +46 173 140 57 ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: can I set panning in midi
Colin Campell: On 13-09-05 04:50 PM, Karl Hammar wrote: Producing exercise sound files for the choir, they basically wants mp3's or something similar. I have tried ogg but their systems kind of not understands that. I'd like to have e.g. basses at left, tenors mid left, altos mid right and sopranos at right, to make each voice easier to hear and follow. Attached is a template I use for a Gospel quartet, Karl. It produces a master score, scores for each part with their voice isolated, and corresponding MIDI files, again with each voice set a bit louder than the other three. I can also use timidity to convert the MIDI files to .mp3 for those who need that format. That could be a way to proceed, I just wanted a *single* file to mitigate confusion and clutter. /// My results so far is in: http://turkos.aspodata.se/motett/c_saint_saens/ and git clone git://turkos.aspodata.se/musik.git I did the mp3 by makeing a sound file for each track timidity -OwM -o 2b_choer.b.wav --mute=1,2,3 2b_choer.midi ... importing the files into ardour, aligning, setting pan, export to wav makeing mp3 with lame 2b_choer.all.wav Well, kindof tedious but workable. Regards, /Karl Hammar --- Aspö Data Lilla Aspö 148 S-742 94 Östhammar Sweden +46 173 140 57 ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: can I set panning in midi
On Fri, 6 Sep 2013, Karl Hammar wrote: I did the mp3 by makeing a sound file for each track timidity -OwM -o 2b_choer.b.wav --mute=1,2,3 2b_choer.midi ... importing the files into ardour, aligning, setting pan, export to wav makeing mp3 with lame 2b_choer.all.wav Well, kindof tedious but workable. Some time ago I did something similar using Lilypond, Timidity, and Audacity when I had made an arrangement for 4 pianos. I set up my lilypond file(s) to be able to produce scores and midi files for the complete score AND for the separate parts. Then I used timidity to produce separate wav files for the 4 parts. I imported these wav files in Audacity. In Audacity I set the panning for each track and then export as new wav or mp3. -- MT ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: can I set panning in midi
On 6 September 2013 19:06, Karl Hammar k...@aspodata.se wrote: Vaughan McAlley: On 6 September 2013 08:50, Karl Hammar k...@aspodata.se wrote: ... For which purposes do You want to use midi? Producing exercise sound files for the choir, they basically wants mp3's or something similar. I have tried ogg but their systems kind of not understands that. I'd like to have e.g. basses at left, tenors mid left, altos mid right and sopranos at right, to make each voice easier to hear and follow. ... I wrote the attached script for exactly this purpose. It saves mucking around with anything more sophisticated than a simple MIDI player. The tracks are distributed evenly across the panning range. Unfortunately it requires Lua, but Lua is small and the last few times I’ve found it very easy to install. More detailed instructions are in the script... For some reason it produces a exact copy of the input file: $ lua -v Lua 5.2.1 Copyright (C) 1994-2012 Lua.org, PUC-Rio $ lua ~/panning.lua 2b_choer.midi zz.midi 2b_choer.midi zz.midi $ lsl 2b_choer.midi zz.midi -rw-r--r-- 1 karl users 2995 2013-09-05 21:39 2b_choer.midi -rw-r--r-- 1 karl users 2995 2013-09-06 08:58 zz.midi $ md5sum 2b_choer.midi zz.midi 203528cd285a0e7438886c9c893d6490 2b_choer.midi 203528cd285a0e7438886c9c893d6490 zz.midi $ Regards, /Karl Hammar Oops, it looks like MIDI files produced by LilyPond 2.17 look a bit different to what 2.16 produced. This revised version of the script appears to work, and spat out the attached MIDI file... Cheers, Vaughan panning.lua Description: Binary data 2b_choer_panned.midi Description: MIDI audio ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: can I set panning in midi
Vaughan McAlley: On 6 September 2013 19:06, Karl Hammar k...@aspodata.se wrote: Vaughan McAlley: On 6 September 2013 08:50, Karl Hammar k...@aspodata.se wrote: ... For which purposes do You want to use midi? Producing exercise sound files for the choir, they basically wants mp3's or something similar. I have tried ogg but their systems kind of not understands that. I'd like to have e.g. basses at left, tenors mid left, altos mid right and sopranos at right, to make each voice easier to hear and follow. ... I wrote the attached script for exactly this purpose. It saves mucking around with anything more sophisticated than a simple MIDI player. The tracks are distributed evenly across the panning range. Unfortunately it requires Lua, but Lua is small and the last few times I’ve found it very easy to install. More detailed instructions are in the script... For some reason it produces a exact copy of the input file: ... Oops, it looks like MIDI files produced by LilyPond 2.17 look a bit different to what 2.16 produced. This revised version of the script appears to work, and spat out the attached MIDI file... This is exactly what I needed, thank you very much! It works wery well with 2b_choer.midi file, 4 tracks, but for some reason it fails with http://turkos.aspodata.se/motett/c_saint_saens/4_air.midi witch have 5 voices, one tenor solo + 4 discant voices. The tenor starts to the right but moves to the middle at measure 7, at least with timidity. Looking att the result midi file it seems panning.lua only set panning i the tenor voice. I found libmidi-perl, so I made this little program: /// #!/usr/bin/perl -w use strict; use MIDI; my $one; foreach $one (@ARGV) { my $opus = MIDI::Opus-new({ 'from_file' = $one }); print $one:\n; $opus-dump({ dump_tracks = 1 }); } /// and testing gives me $ lua5.2 ~/panning.lua 2b_choer.midi 2.midi $ ./midi.pl 2.midi | grep -v note_on 2.midi: MIDI::Opus-new({ 'format' = 1, 'ticks' = 384, 'tracks' = [ # 5 tracks... # Track #0 ... MIDI::Track-new({ 'type' = 'MTrk', 'events' = [ # 5 events. ['track_name', 0, 'control track'], ['text_event', 0, 'creator: '], ['text_event', 0, 'GNU LilyPond 2.17.10 '], ['time_signature', 0, 4, 2, 18, 8], ['set_tempo', 0, 41], ] }), # Track #1 ... MIDI::Track-new({ 'type' = 'MTrk', 'events' = [ # 162 events. ['patch_change', 0, 0, 33], ['patch_change', 0, 0, 33], ['instrument_name', 0, 'electric bass (finger)'], ['control_change', 0, 0, 7, 100], ['control_change', 0, 0, 10, 0], ['track_name', 0, ':Vs'], ] }), # Track #2 ... MIDI::Track-new({ 'type' = 'MTrk', 'events' = [ # 182 events. ['patch_change', 0, 1, 33], ['patch_change', 0, 1, 33], ['instrument_name', 0, 'electric bass (finger)'], ['control_change', 0, 1, 7, 100], ['control_change', 0, 1, 10, 42], ['track_name', 0, ':Va'], ] }), # Track #3 ... MIDI::Track-new({ 'type' = 'MTrk', 'events' = [ # 122 events. ['patch_change', 4608, 2, 33], ['patch_change', 0, 2, 33], ['instrument_name', 0, 'electric bass (finger)'], ['control_change', 0, 2, 7, 100], ['control_change', 0, 2, 10, 85], ['track_name', 0, ':Vt'], ] }), # Track #4 ... MIDI::Track-new({ 'type' = 'MTrk', 'events' = [ # 146 events. ['patch_change', 4608, 3, 33], ['patch_change', 0, 3, 33], ['instrument_name', 0, 'electric bass (finger)'], ['control_change', 0, 3, 7, 100], ['control_change', 0, 3, 10, 127], ['track_name', 0, ':Vb'], ] }), ] }); So it does it's job. But for $ lua ~/panning.lua 4_air.midi 4.midi $ ./midi.pl 4.midi | grep -v note_on b $ ./midi.pl 4_air.midi | grep -v note_on a $ diff a b 1c1 4_air.midi: --- 4.midi: 22c22 'events' = [ # 252 events. --- 'events' = [ # 253 events. 27a28 ['control_change', 0, 0, 10, 0], $ I.e. only the tenor track is changed. Idéas? Regards, /Karl Hammar --- Aspö Data Lilla Aspö 148 S-742 94 Östhammar Sweden +46 173 140 57 ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: can I set panning in midi
k...@aspodata.se (Karl Hammar) writes: I can set midi instrument with e.g. [...] but can I set where in the stereo left-right sound picture the sound will be placed ? No. -- David Kastrup ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: can I set panning in midi
David Kastrup: k...@aspodata.se (Karl Hammar) writes: I can set midi instrument with e.g. [...] but can I set where in the stereo left-right sound picture the sound will be placed ? No. http://www.midi.org/aboutmidi/intromidi.pdf Says on page 14: 42 LSB for Control 10 (Pan) and http://home.roadrunner.com/~jgglatt/tech/midispec/pan.htm mentions pan, perhaps this is fixable. /// In the meantime I'll make make four sound files and mix them together. Regards, /Karl Hammar --- Aspö Data Lilla Aspö 148 S-742 94 Östhammar Sweden +46 173 140 57 ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: can I set panning in midi
k...@aspodata.se (Karl Hammar) writes: David Kastrup: k...@aspodata.se (Karl Hammar) writes: I can set midi instrument with e.g. [...] but can I set where in the stereo left-right sound picture the sound will be placed ? No. http://www.midi.org/aboutmidi/intromidi.pdf Says on page 14: 42 LSB for Control 10 (Pan) Nobody doubted that Midi can represent panning. In the meantime I'll make make four sound files and mix them together. Or four tracks and use a Midi editor/tool to set the pan values. -- David Kastrup ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: can I set panning in midi
Karl Hammar k...@aspodata.se wrote: David Kastrup: k...@aspodata.se (Karl Hammar) writes: but can I set where in the stereo left-right sound picture the sound will be placed ? No. http://www.midi.org/aboutmidi/intromidi.pdf Says on page 14: 42 LSB for Control 10 (Pan) and http://home.roadrunner.com/~jgglatt/tech/midispec/pan.htm mentions pan, perhaps this is fixable. David was not trying to say this is not possible in MIDI. He was trying to say this is not possible in Lilypond. Lilypond does not, in general, provide access to arbitrary sysex features in MIDI. There are certainly tools that allow you post-process a MIDI file to set the panning positions. -- Tim Roberts, t...@probo.com Providenza Boekelheide, Inc. ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: can I set panning in midi
Dear Karl, which platform do You use? WIndows, Mac, Linux? For which purposes do You want to use midi? On Linux I can recommand rosegarden (it is very easy to edit midi-files with it), for Windows there are a lot of apps available. I guess reaper is not bad. David Kastrup: k...@aspodata.se (Karl Hammar) writes: David Kastrup: k...@aspodata.se (Karl Hammar) writes: I can set midi instrument with e.g. [...] but can I set where in the stereo left-right sound picture the sound will be placed ? No. http://www.midi.org/aboutmidi/intromidi.pdf Says on page 14: 42 LSB for Control 10 (Pan) Nobody doubted that Midi can represent panning. I didn't know. In the meantime I'll make make four sound files and mix them together. Or four tracks and use a Midi editor/tool to set the pan values. I'm new to midi, if you have suggestions, please say. H?lsningar, /Karl Hammar -- - Asp? Data Lilla Asp? 148 S-742 94 ?sthammar Sverige 0173 140 57 ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: can I set panning in midi
David Kastrup: k...@aspodata.se (Karl Hammar) writes: David Kastrup: k...@aspodata.se (Karl Hammar) writes: I can set midi instrument with e.g. [...] but can I set where in the stereo left-right sound picture the sound will be placed ? No. http://www.midi.org/aboutmidi/intromidi.pdf Says on page 14: 42 LSB for Control 10 (Pan) Nobody doubted that Midi can represent panning. I didn't know. In the meantime I'll make make four sound files and mix them together. Or four tracks and use a Midi editor/tool to set the pan values. I'm new to midi, if you have suggestions, please say. Hälsningar, /Karl Hammar --- Aspö Data Lilla Aspö 148 S-742 94 Östhammar Sverige 0173 140 57 ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: can I set panning in midi
Stefan Thomas: which platform do You use? WIndows, Mac, Linux? Linux. For which purposes do You want to use midi? Producing exercise sound files for the choir, they basically wants mp3's or something similar. I have tried ogg but their systems kind of not understands that. I'd like to have e.g. basses at left, tenors mid left, altos mid right and sopranos at right, to make each voice easier to hear and follow. On Linux I can recommand rosegarden (it is very easy to edit midi-files Trying rosegarden, immense abount of debug msg on the terminal, lots of buttons I don't understand, yes I can see it connected to jack, no sound, yes there a knob with pan labelled here, etc... oops why does it abort? I have been using timidity, but it doesn't seem to have a pan control, maybe sox can help. Regards, /Karl Hammar --- Aspö Data Lilla Aspö 148 S-742 94 Östhammar Sweden +46 173 140 57 ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: can I set panning in midi
on 2013-09-06 at 00:50 Karl Hammar wrote: Trying rosegarden, immense abount of debug msg on the terminal, lots of buttons I don't understand, yes I can see it connected to jack, no sound, yes there a knob with pan labelled here, etc... oops why does it abort? ugh, i'm sorry you're having so much trouble with rosegarden... it's not an application i particularly love, but it should work better than that, really. what linux distribution are you using, and which version of rosegarden? i don't bother with jack or any audio output in rosegarden, i just use it for some basic editing of midi files, and then render with timidity. i just tried editing a midi file with several tracks, and inserting a control event (control 10) in each track was easy and it worked. you have to open the event editor for each track, and then insert event from the menu. it should just work... good luck, lj ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: can I set panning in midi
On 6 September 2013 08:50, Karl Hammar k...@aspodata.se wrote: Stefan Thomas: which platform do You use? WIndows, Mac, Linux? Linux. For which purposes do You want to use midi? Producing exercise sound files for the choir, they basically wants mp3's or something similar. I have tried ogg but their systems kind of not understands that. I'd like to have e.g. basses at left, tenors mid left, altos mid right and sopranos at right, to make each voice easier to hear and follow. On Linux I can recommand rosegarden (it is very easy to edit midi-files Trying rosegarden, immense abount of debug msg on the terminal, lots of buttons I don't understand, yes I can see it connected to jack, no sound, yes there a knob with pan labelled here, etc... oops why does it abort? I have been using timidity, but it doesn't seem to have a pan control, maybe sox can help. Regards, /Karl Hammar --- Aspö Data Lilla Aspö 148 S-742 94 Östhammar Sweden +46 173 140 57 ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user I wrote the attached script for exactly this purpose. It saves mucking around with anything more sophisticated than a simple MIDI player. The tracks are distributed evenly across the panning range. Unfortunately it requires Lua, but Lua is small and the last few times I’ve found it very easy to install. More detailed instructions are in the script... Vaughan panning.lua Description: Binary data ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user