Sustaining midi notes with a sustain pedal without using CC64

Hello Steve,

I'm using the Interactive Phrase Synthesizer on an Atari ST, and it responds to CC64, but not in the same way as an instrument normally does.

If I press the sustain pedal it holds the notes, and when I release it they are removed. But if, for example, I play some notes while the sustain pedal is already down, they are removed when the pedal goes up, even if I'm still holding the notes down on the keyboard. The IPS keeps the same consistent timing if midi notes overlap. So to keep the IPS consistently in sync with my clock, I need it to think I always have a note held down without interruptions, otherwise it starts sequencing again from the next note on message making it harder to control while improvising.

Is there a project around that could guide me on my way? And if not, would you have some advice if I try to write something like this?

Thanks a lot!

Kind regards,

Jacco

Hi Jacco,

So if I am hearing correctly. You want the sustain-up (CC64 =0) incoming action to be suppressed as long as there is one or more notes currently being held down.

I think the way I would solve this is set up a counter to count note-on messages. You basically increment the count on every note-on and decrement the count on any note-off.

When you get a CC64 value 0 (sustain pedal up), you check to see if any notes are still down (the counter is >0 ) and if they are you ignore the action. I guess you could pass through the action if all notes have been released (counter = 0) to ensure if there is any residual tone from the notes still playing, they get killed.

 

 

Does this make sense?

 

Steve Caldwell
Bome Customer Care


Also available for paid consulting services: bome@sniz.biz

Hi Steve,

Thanks so much for your answer. While this would already improve my situation, the only thing I’d also like to be able to do, is for the notes that are not held down on the keyboard, to send a note off when I release the sustain pedal. Basically exactly the same as normally a sustain pedal works on most digital piano’s. The next chord can already be played while the previous chord is still sustained, which can create dissonance, and then the sustain pedal can mute the notes of the previous chord, resolving the dissonance and the new chord remains. This is what the IPS cannot do, sadly. When the sustain pedal is released, all notes are always muted, including the ones I’m still playing. So I guess I need to somehow prevent note offs being sent to the keys I’m playing when the sustain is released. Would this make things more complicated?

Thanks a lot!

Kind regards,

Jacco

Hi Steve, Thanks so much for your answer. While this would already improve my situation, the only thing I'd also like to be able to do, is for the notes that are not held down on the keyboard, to send a note off when I release the sustain pedal.

SJC> If there is a note not being held down, shouldn't it already have sent a note-off message to the target device? Does your device not send note-off messages? I'm not sure why we would send a note-off message to a note that is already off. It sounds like your sustain pedal must be sending an "all notes off" message or at least that is how your device is interpreting the sustain pedal release. Maybe just suppressing sustain up actions is all that is needed here.

Steve Caldwell
Bome Customer Care


Also available for paid consulting services: bome@sniz.biz

 

 

Yes it seems like the sustain pedal release is interpreted as an ”all notes off” message. This doesn’t happen when the sustain pedal is used with a different device, where it acts normal, so it seems to be related to the device. I would like it to instead act like it acts when connected to normal device, and avoid sending the note off message to the notes that should still be on, because of the key still being pressed on the keyboard. The reason for this is because the IPS works similar to a polyphonic midi arpeggiator. The arpeggiator starts when I play a chord, and to sync it with for example a drum machine, I need to play the chord exactly in the right moment, and keep the chord sustained until the end of the song, either just by hand or by using a pedal, which frees my hand to be used another keyboard for example, otherwise the arpeggiator could be slightly out of sync every time I play a new chord. Using a sustain pedal works well because the notes are held and the arpeggiator keeps going, but when I want to change to another chord, and the sustain pedal is still down, it just adds the new notes to the notes already used in the arpeggio, and mutes all notes when it goes up. Ideally I would be able to play the new chord, lift the sustain pedal, and what would remain would be the new chord, being used in the arpeggio, while keeping the initial sync. Though because of the ”all notes off” message which is being sent now, I have to play the new chord again when the sustain pedal is up, with the risk of it not being fully in sync. It seems to be something inherent to the way the IPS responds to CC64, so if I could sustain the notes without needing CC64, simply only by extending the note on, until those notes that I’d like to mute, receive a note off when the pedal goes up, the problem would be fixed. I know it’s a bit confusing the IPS works like this, but I have a feeling the Bome Box could be the solution. Thanks!

Let me give that a bit more thought. Maybe I can figure out a strategy.

Hi Jacco,

Give the attached a try.

What I do is track all notes pressed in a bitmap of 4 global variables g0,g1,g2,g3.

The program looks at your first note pressed to determine the correct MIDI channel and then from there on uses that channel, but if you set the global variable gc to the incoming channel 0-15 in  the translator 0.2 then you can hard code it to a given channel. With a gc value of -1 it tells the project to use the incoming channel of the first note pressed (which is how I have it set up).

I still use CC64 as my sustain input, however instead of passing this on the the sound engine, I use it to hold keep notes on by suppressing the note off message when the keys are released while holding sustain.

Then when sustain pedal is released, I have a timer that iterates through all of the notes. If a note is still pressed, it does nothing. If it is not pressed it forces a note-off for that note.

So essentially, when releasing the sustain pedal only notes that are not still pressed will be turned off and any notes still pressed will not send a note-off message and will still sound until the note is released.

You can either use the keyboard's built in sustain if it uses CC64 (Alias "My Keyboard") or an external Sustain pedal CC64 (Alias "Sustain Pedal), but don't try doing both at once.

The output goes to alias "My Application" which I have set to BMT 1 but you can set it to any MIDI port that you want.

It turns out that this issue is also common with Ableton Live so that is how I tested it.

Steve Caldwell
Bome Customer Care


Also available for paid consulting services: bome@sniz.biz

 

 


Attachments:
1595690296435_Sustain-Handler-2020-07-25.bmtp
1 Like

Hi Steve,

Ah wow using a timer to check the status of the keys is a clever solution, that I would definitely not have thought of myself! Very nice! And I’m happy that this might help Ableton Live users too. Very excited to try this!

Thanks a lot!

Jacco

You’re welcome! Let me know how it goes.

Hmm when using the Bomebox with the project loaded and enabled, and the DIN in and out assigned (for both keyboard and pedal input, (also tried pedal input only, keyboard input set to none) it seems to behave in the same way it does when connected directly, without Bomebox. Maybe there is a step I skipped? I attached a video demonstrating the current effect. The “hold” button on the Arturia Keystep lights up when the sustain pedal is down, and turns off when it goes up. First I played the chord change manually, and then using the sustain pedal. The string sound behaves normal, as it is send directly thru to the sound module. But the harp/bass arpeggio stops, as it is interpreted by the IPS. Could it be that CC64 is still being sent through the bomebox? I might have overlooked something. https://www.dropbox.com/s/ofb0vluimntjmcx/IMG_8574.MOV?dl=0

Jacco

Not at my computer right now but make sure you don't have any thru paths set

Hi,

I made a few changes.

  1. I made sure the translators/presets had the right input and output ports set only
  2. I added a translator to deactivate the "Notes" preset at project start and to reactivate it once the channel is known.

If your pedal or keyboard is not using CC64 you will have to set it to whatever it sends on translators 1.3 (for keyboard) and 1.4 (for Pedal)

Again, make sure no MIDI thru paths are set on your BomeBox.

 

Steve Caldwell
Bome Customer Care


Also available for paid consulting services: bome@sniz.biz

 


Attachments:
1595717146611_Sustain-Handler-2020-07-25a.bmtp

Hi Steve,

I've been trying the bome project you've so kindly supplied me with, but it doesn't seem to function well with the IPS for some reason. Here is a video of what happens when I play a chord, use the sustain pedal, then while the pedal is down I play the next chord, and then I lift the pedal up, to remove the previous chord from the string sound, but also from the arpeggio. Note that the second chord is muted, even though I was actually still playing it with my hand, without having lifted it. https://www.dropbox.com/s/k520bw69ptmzx6h/IMG_8591.MOV?dl=0 .

I've checked all the routing settings and they seem to be correct. I've also monitored the midi output of the bomebox, and there is no CC64, so that seems to work. I've attached a screenshot of the output of the bomebox, where I play a Dm chord on ch 5 , that is then sustained with the pedal, and released.

I really don't understand why the IPS stops arpeggiating, while it is definitely not receiving CC64. There must be something about the way the IPS interprets the incoming midi that I don't fully understand...

Let me know what you think and if you'd like me to test some more situations, of which I can make video's/screenshots.

Thanks a lot!

Jacco


Attachments:
![](upload://oxg1RzepaP9sNwTOorNYrM9hieu.jpeg)

Hi Jacco,

In the log above I can see notes and an all notes off command which is CC 123 with value of 0. So I think you are not sending sustain. Could you capture a log of just pressing and releasing the pedal.? We may need to use a different CC than 64 to manage the sustain function. If there is no pedal down MIDI and only pedal up, however this might be difficult.

Steve Caldwell
Bome Customer Care


Also available for paid consulting services: bome@sniz.biz

 

Hmm yes the all notes off command might be part of the problem. I've checked where the command could be coming from, and it seems that every time I release all keys on the keyboard the all notes off command is sent. It seems that this is part of the midi keyboard I am using. This is not the case when I use a different (more modern) midi keyboard, so I switched from the 1990's Roland midi keyboard I was using, to an Arturia Keystep, and the command seems to be gone when monitoring the midi output directly from the keyboard. But to make things stranger, as soon as I monitor what the midi coming from the IPS looks like, there are also all notes off commands, after every note off generated by the arpeggiator, on the midi channel assigned in the IPS. Maybe the all notes off command was more usual in that time period? Though the midi that is interpreted by the IPS does not have this command present. When I press the sustain pedal, no midi is sent. Only bypassing bomebox there is midi CC64 when I press and release the sustain pedal. Which is really strange because the IPS has to somehow know I released the sustain pedal for the arpeggiator to stop, without receiving CC64, which is now being blocked by the bomebox. I've attached a screenshot of midi activity when I play the note D on the keyboard (direct on channel 5) which is triggering the arpeggiator (on channel 4) which only uses the note D. After which I play a C, before sending a note off for D. Then I release D, and C remains. Sustaining both ch 5 and 4 with the pedal works, but when I lift the pedal, the arpeggiator stops, and I can't find an indication on the midi monitor why this is happening... Very mysterious!


Attachments:
![](upload://htzMqmyICbErsnzEUhMNiyIKotd.jpeg)

Maybe we should suppress the all-notes off message being sent by the IPS?

Also it looks like you are getting notes on MIDI CH 5 , Channel Aftertouch on MIDI CH 4 and all-notes off on MIDI CH4 so maybe we should suppress all MIDI CH 4 messages?

I did this in the attached with translators 2.2 and 2.3. I am also suppressing All-Notes-Off messages on translator 1.4.

 

 

 


Attachments:
1595978983603_Sustain-Handler-2020-07-28.bmtp

Ah great, I'll give this a try! Thanks! I have the feeling the problem could be somewhere else, because when I don't use a sustain pedal, and I send midi input to the IPS directly from the midi keyboard only (on ch5), everything works perfectly, without the IPS arpeggiator being interrupted. As long as there is always a note on present, the IPS continues in sync. It is just when lifting the sustain pedal that the arpeggiator stops, and has to be started again by leaving space between the last note off, and the next note on message. I will dig a little more into this situation and why this is happening, and if I can't find the cause, I might write to the person who programmed this instrument in the late 80's. He (Werner Kracht) actually has his own youtube channel where he uploaded demonstrations of these pieces of atari software, so hopefully he can tell me a bit more about the midi interpretations happening. Here is a video of him demonstrating the IPS: https://www.youtube.com/watch?v=MFEjMD4Brzw

I'll give the updated Sustain Handler translator a try and let you know how it goes! Thanks a lot!

OK, Jacco,

 

If this doesn\'t do it, perhaps you can open the MT Pro MIDI log window and check the checkboxes MIDI-IN and MIDI-OUT. Then play the application. Go to log window and select all then copy and past into a text file.

Steve Caldwell
Bome Customer Care


Also available for paid consulting services: bome@sniz.biz

Hi Steve,

I'm testing and monitoring the output of the bomebox, and I've added a translator that mutes CC123, the "all notes off" command on any incoming channel. Now the only midi data being sent into the IPS are note on, and note off messages. Which should make it impossible for the IPS to know whether it is just my hand playing the keyboard, or if the sustain pedal is being used. Somehow lifting the sustain pedal still stops the IPS from running though. Upon monitoring the midi data coming out of the bomebox, the only two things I can think of that could cause this, is that the note off's generated by the timer are all with value "0" while releasing a key by hand generates a note off with a value above 0. Not sure if that should make any difference though. The only other thing I could imagine could be the amount of note off's generated by the timer that are interpreted as an "all notes off" command? Though that would be more unlikely I think. Here's a copy paste of the midi translator's log. First I'm playing a D again, then sustaining it with the sustain pedal (which does not generate any additional midi message), then while the D sustains I'm adding a C which I'm holding by hand while I release the sustain pedal. This adds one note on midi message for C, and then triggers the timer and sends the list of note offs when releasing the pedal. The last midi message is a note off by my hand releasing the C key. It really looks like this should work perfectly, so I really wonder what is going on. I'm splitting the midi signal with a thru box after the IPS so I'm totally sure the same data is entering the IPS.

Thanks a lot for helping me out with this one!

Jacco

Log Window:

1: MIDI IN [Scarlett 18i20 USB]: 94 32 66
2: MIDI IN [Scarlett 18i20 USB]: 94 30 5E
3: MIDI IN [Scarlett 18i20 USB]: 84 7F 00
4: MIDI IN [Scarlett 18i20 USB]: 84 7E 00
5: MIDI IN [Scarlett 18i20 USB]: 84 7D 00
6: MIDI IN [Scarlett 18i20 USB]: 84 7C 00
7: MIDI IN [Scarlett 18i20 USB]: 84 7B 00
8: MIDI IN [Scarlett 18i20 USB]: 84 7A 00
9: MIDI IN [Scarlett 18i20 USB]: 84 79 00
10: MIDI IN [Scarlett 18i20 USB]: 84 78 00
11: MIDI IN [Scarlett 18i20 USB]: 84 77 00
12: MIDI IN [Scarlett 18i20 USB]: 84 76 00
13: MIDI IN [Scarlett 18i20 USB]: 84 75 00
14: MIDI IN [Scarlett 18i20 USB]: 84 74 00
15: MIDI IN [Scarlett 18i20 USB]: 84 73 00
16: MIDI IN [Scarlett 18i20 USB]: 84 72 00
17: MIDI IN [Scarlett 18i20 USB]: 84 71 00
18: MIDI IN [Scarlett 18i20 USB]: 84 70 00
19: MIDI IN [Scarlett 18i20 USB]: 84 6F 00
20: MIDI IN [Scarlett 18i20 USB]: 84 6E 00
21: MIDI IN [Scarlett 18i20 USB]: 84 6D 00
22: MIDI IN [Scarlett 18i20 USB]: 84 6C 00
23: MIDI IN [Scarlett 18i20 USB]: 84 6B 00
24: MIDI IN [Scarlett 18i20 USB]: 84 6A 00
25: MIDI IN [Scarlett 18i20 USB]: 84 69 00
26: MIDI IN [Scarlett 18i20 USB]: 84 68 00
27: MIDI IN [Scarlett 18i20 USB]: 84 67 00
28: MIDI IN [Scarlett 18i20 USB]: 84 66 00
29: MIDI IN [Scarlett 18i20 USB]: 84 65 00
30: MIDI IN [Scarlett 18i20 USB]: 84 64 00
31: MIDI IN [Scarlett 18i20 USB]: 84 63 00
32: MIDI IN [Scarlett 18i20 USB]: 84 62 00
33: MIDI IN [Scarlett 18i20 USB]: 84 61 00
34: MIDI IN [Scarlett 18i20 USB]: 84 5F 00
35: MIDI IN [Scarlett 18i20 USB]: 84 5E 00
36: MIDI IN [Scarlett 18i20 USB]: 84 5D 00
37: MIDI IN [Scarlett 18i20 USB]: 84 5C 00
38: MIDI IN [Scarlett 18i20 USB]: 84 5B 00
39: MIDI IN [Scarlett 18i20 USB]: 84 5A 00
40: MIDI IN [Scarlett 18i20 USB]: 84 59 00
41: MIDI IN [Scarlett 18i20 USB]: 84 58 00
42: MIDI IN [Scarlett 18i20 USB]: 84 57 00
43: MIDI IN [Scarlett 18i20 USB]: 84 56 00
44: MIDI IN [Scarlett 18i20 USB]: 84 55 00
45: MIDI IN [Scarlett 18i20 USB]: 84 54 00
46: MIDI IN [Scarlett 18i20 USB]: 84 53 00
47: MIDI IN [Scarlett 18i20 USB]: 84 52 00
48: MIDI IN [Scarlett 18i20 USB]: 84 51 00
49: MIDI IN [Scarlett 18i20 USB]: 84 50 00
50: MIDI IN [Scarlett 18i20 USB]: 84 4F 00
51: MIDI IN [Scarlett 18i20 USB]: 84 4E 00
52: MIDI IN [Scarlett 18i20 USB]: 84 4D 00
53: MIDI IN [Scarlett 18i20 USB]: 84 4C 00
54: MIDI IN [Scarlett 18i20 USB]: 84 4B 00
55: MIDI IN [Scarlett 18i20 USB]: 84 4A 00
56: MIDI IN [Scarlett 18i20 USB]: 84 49 00
57: MIDI IN [Scarlett 18i20 USB]: 84 48 00
58: MIDI IN [Scarlett 18i20 USB]: 84 47 00
59: MIDI IN [Scarlett 18i20 USB]: 84 46 00
60: MIDI IN [Scarlett 18i20 USB]: 84 45 00
61: MIDI IN [Scarlett 18i20 USB]: 84 44 00
62: MIDI IN [Scarlett 18i20 USB]: 84 43 00
63: MIDI IN [Scarlett 18i20 USB]: 84 42 00
64: MIDI IN [Scarlett 18i20 USB]: 84 41 00
65: MIDI IN [Scarlett 18i20 USB]: 84 40 00
66: MIDI IN [Scarlett 18i20 USB]: 84 3F 00
67: MIDI IN [Scarlett 18i20 USB]: 84 3E 00
68: MIDI IN [Scarlett 18i20 USB]: 84 3D 00
69: MIDI IN [Scarlett 18i20 USB]: 84 3C 00
70: MIDI IN [Scarlett 18i20 USB]: 84 3B 00
71: MIDI IN [Scarlett 18i20 USB]: 84 3A 00
72: MIDI IN [Scarlett 18i20 USB]: 84 39 00
73: MIDI IN [Scarlett 18i20 USB]: 84 38 00
74: MIDI IN [Scarlett 18i20 USB]: 84 37 00
75: MIDI IN [Scarlett 18i20 USB]: 84 36 00
76: MIDI IN [Scarlett 18i20 USB]: 84 35 00
77: MIDI IN [Scarlett 18i20 USB]: 84 34 00
78: MIDI IN [Scarlett 18i20 USB]: 84 33 00
79: MIDI IN [Scarlett 18i20 USB]: 84 32 00
80: MIDI IN [Scarlett 18i20 USB]: 84 31 00
81: MIDI IN [Scarlett 18i20 USB]: 84 2F 00
82: MIDI IN [Scarlett 18i20 USB]: 84 2E 00
83: MIDI IN [Scarlett 18i20 USB]: 84 2D 00
84: MIDI IN [Scarlett 18i20 USB]: 84 2C 00
85: MIDI IN [Scarlett 18i20 USB]: 84 2B 00
86: MIDI IN [Scarlett 18i20 USB]: 84 2A 00
87: MIDI IN [Scarlett 18i20 USB]: 84 29 00
88: MIDI IN [Scarlett 18i20 USB]: 84 28 00
89: MIDI IN [Scarlett 18i20 USB]: 84 27 00
90: MIDI IN [Scarlett 18i20 USB]: 84 26 00
91: MIDI IN [Scarlett 18i20 USB]: 84 25 00
92: MIDI IN [Scarlett 18i20 USB]: 84 24 00
93: MIDI IN [Scarlett 18i20 USB]: 84 23 00
94: MIDI IN [Scarlett 18i20 USB]: 84 22 00
95: MIDI IN [Scarlett 18i20 USB]: 84 21 00
96: MIDI IN [Scarlett 18i20 USB]: 84 20 00
97: MIDI IN [Scarlett 18i20 USB]: 84 1F 00
98: MIDI IN [Scarlett 18i20 USB]: 84 1E 00
99: MIDI IN [Scarlett 18i20 USB]: 84 1D 00
100: MIDI IN [Scarlett 18i20 USB]: 84 1C 00
101: MIDI IN [Scarlett 18i20 USB]: 84 1B 00
102: MIDI IN [Scarlett 18i20 USB]: 84 1A 00
103: MIDI IN [Scarlett 18i20 USB]: 84 19 00
104: MIDI IN [Scarlett 18i20 USB]: 84 18 00
105: MIDI IN [Scarlett 18i20 USB]: 84 17 00
106: MIDI IN [Scarlett 18i20 USB]: 84 16 00
107: MIDI IN [Scarlett 18i20 USB]: 84 15 00
108: MIDI IN [Scarlett 18i20 USB]: 84 14 00
109: MIDI IN [Scarlett 18i20 USB]: 84 13 00
110: MIDI IN [Scarlett 18i20 USB]: 84 12 00
111: MIDI IN [Scarlett 18i20 USB]: 84 11 00
112: MIDI IN [Scarlett 18i20 USB]: 84 10 00
113: MIDI IN [Scarlett 18i20 USB]: 84 0F 00
114: MIDI IN [Scarlett 18i20 USB]: 84 0E 00
115: MIDI IN [Scarlett 18i20 USB]: 84 0D 00
116: MIDI IN [Scarlett 18i20 USB]: 84 0C 00
117: MIDI IN [Scarlett 18i20 USB]: 84 0B 00
118: MIDI IN [Scarlett 18i20 USB]: 84 0A 00
119: MIDI IN [Scarlett 18i20 USB]: 84 09 00
120: MIDI IN [Scarlett 18i20 USB]: 84 08 00
121: MIDI IN [Scarlett 18i20 USB]: 84 07 00
122: MIDI IN [Scarlett 18i20 USB]: 84 06 00
123: MIDI IN [Scarlett 18i20 USB]: 84 05 00
124: MIDI IN [Scarlett 18i20 USB]: 84 04 00
125: MIDI IN [Scarlett 18i20 USB]: 84 03 00
126: MIDI IN [Scarlett 18i20 USB]: 84 02 00
127: MIDI IN [Scarlett 18i20 USB]: 84 01 00
128: MIDI IN [Scarlett 18i20 USB]: 84 00 00
129: MIDI IN [Scarlett 18i20 USB]: 84 30 40

Hi Steve,

I've added a velocity value above 0 (40) for the note off messages generated by the timer, but it does not make any difference. That leaves only the option of the amount of note off's telling the IPS to stop running, or a signal that is not MIDI and cannot be monitored with a midi monitor? Not sure if that is even possible?

Almost giving up on this. Really not sure why it knows I'm using a sustain pedal. Until perhaps I get a reply from Werner, the programmer of the IPS...

Thanks!

Jacco