Welcome to %s forums

BrainModular Users Forum

Login Register

Mute track also for MIDI data and not only AUDIO

Tell us what you'd like Usine to do
Post Reply
cybercharles
Member
Posts: 83
Location: Lyon
Contact:

Unread post by cybercharles » 07 Jan 2009, 23:57

Hi

It would great to be able to mute MIDI OUT DATA when the track mute is ON and not only audio.

See U

Charles
t

User avatar
nay-seven
Site Admin
Posts: 5684
Location: rennes France
Contact:

Unread post by nay-seven » 08 Jan 2009, 07:11

i'm pretty sure you can yet do this ... something with : has changed ,stop,toggle....? ;-)

cybercharles
Member
Posts: 83
Location: Lyon
Contact:

Unread post by cybercharles » 08 Jan 2009, 09:52

Hi you have right ! and I'm doing this that why I suggest to implement this feature in USINE !

Just want to say that this feature does not exist in any other Software that I use and it will be very useful to have a second toggle “midi mute” just near the audio mute and doing a right click to MIDI learn …

See U
t

User avatar
senso
Site Admin
Posts: 4424
Location: France
Contact:

Unread post by senso » 08 Jan 2009, 10:06

but I'm not sure to realy understand the concept of 'mute data'.
what do you mean?

amiga909
Member
Posts: 324
Contact:

Unread post by amiga909 » 08 Jan 2009, 13:19

can be done very easily with a custom script.
what it does:
- mutes the midi if 'mute' switch is active
- does not prevent hanging notes

instruction:
1. open a midi script module and copy/paste the code below
2. download bsorks clearmidinotes script from the midi addons (needed to avoid hanging notes when u press 'mute')
3. arrange the modules as shown in picture below

comments:
- hope its what u mean?
- not perfect it any way: midi notecloser is triggered twice instead of once (improve yourself?)


here a picture of the patch:
Image

here the midi mute code (took my 2min):
(took the midi split script by mr. moussay for fast edit..)

Code: Select all

//////////////////////////
// Midi mute
// by amiga909
/////////////////////////
// parameters declaration
var input   : Tparameter;
var output1  : Tparameter;
var mute : Tparameter;


// initi 
procedure init;
begin  
 input := CreateParam('In',ptMidi);
 output1  := CreateParam('Out',ptMidi);
 mute := CreateParam('mute',ptSwitch  );
 
 SetIsInput(output1,false);
 SetIsOutPut(input,false);
 //SetIsOutPut(mute,false);
 SetDefaultValue(mute,0);
end;

// Global variables
var i            : integer;
var isMute 		 : boolean;
var nbOfMidiIN   : integer;
var nbOfMidiOUT1  : integer;
var ReceivedMidi : TMidi;


//////////////////////////////
// main proc
//////////////////////////////
begin
 isMute := getValue(mute)>0;
 nbOfMidiIN := GetLength(input);  // get the number of incoming midi codes  
 if (nbOfMidiIN > 0) AND (isMute = false)
 then begin
       nbOfMidiOUT1 := 0;
    for i := 0 to nbOfMidiIN-1         // loop for all input codes, for polyphonic data (chords)
    do begin
       GetMidiArrayValue(input,i,ReceivedMidi); // get each code       
       SetMidiArrayValue(output1,nbOfMidiOUT1,ReceivedMidi); // set output1 value 
       nbOfMidiOUT1 := nbOfMidiOUT1 + 1           
    end;
  begin
      SetLength(outPut1,nbOfMidiOUT1); 
  end;
 end 
 else 
    begin 
      SetLength(outPut1,0); 
    end;
end.

bsork
Site Admin
Posts: 1334
Location: Asker, Norway
Contact:

Unread post by bsork » 08 Jan 2009, 14:11

Hi, I don't see any need for two scripts. Here's a variation of Amiga909's suggestion:

Control data:
CurrentTrackNumber -> MixerOutput.Track
MixerOutput.Mute -> From0To1 -> ClearMidiNotes.SendNoteOffs
MixerOutput.Mute -> StopEventFlow.Stop

MIDI data:
<SomeMidiModule>.Out -> StopEventFlow -> VST/MidiOut.In
<SomeMidiModule>.Out -> ClearMidiNotes -> VST/MidiOut.In

This will mute the MIDI data going from whatever module being used for inputting or generating to whatever destination being used when the track's Mute button is on. The one thing still being output is the auxes, since the Mute button doesn't mute those like it would on most mixers.
Bjørn S

amiga909
Member
Posts: 324
Contact:

Unread post by amiga909 » 08 Jan 2009, 14:43

tkx for the correction hint, bsork.

Image

did not realize 'stop_event_flow' works with midi streams!

question:
- does any1 know how/why midi events are represented as floats (see trace window)?
- tried to alter the 'float-midi-values' (coming from the event_flow_stop module) with a mult/add math modules..
could not see any logic behind this?

bsork
Site Admin
Posts: 1334
Location: Asker, Norway
Contact:

Unread post by bsork » 08 Jan 2009, 15:00

I guess the Trace module is created as being quite generic and that the values you see is only a float presentation of the bytes of the first MIDI record in the array. Personally, I practically never use it, since selecting a wire gives me whatever trace values I need.

Since the MIDI data is a record data type, it doesn't make much sense to treat it like any other data when it comes to calculations and such.
Bjørn S

cybercharles
Member
Posts: 83
Location: Lyon
Contact:

Unread post by cybercharles » 08 Jan 2009, 16:37

Hi

I’m surprise to have so many replies about this topic. Thanks but not exactly what I expected.

I will explain better my request and why this feature could be useful in my music.

I don’t know how do you use USINE. I’m using USINE in two times. First programming patch ideas etc etc …

Second time to music !

At this point I try to use USINE in the simplest way as possible that means controlling VOLUME tracks, MUTE tracks and SOLO tracks and AUX SEND like in DUB music …I’m not trying to have one external controller for one single parameter and having 100 parameters to control with only ten fingers…

So i have SOUND & MIDI tracks to one side and EFFECT tracks to the other side.
I’m playing with VOLUME, MUTE, SOLO and AUX to send SOUND and MIDI data to the EFFECT tracks.

Now, I hope, you can understand better my request.

To be more precise in the topic:

I suppose when you switch ON the MUTE toggle you stop the sound through the AUDIO OUT module.

What I want is a switch to have the same result but for the MIDI OUT module. Simple ! No ? I’m joking…

See you

Charles
t

amiga909
Member
Posts: 324
Contact:

Unread post by amiga909 » 08 Jan 2009, 17:30

cybercharles wrote:Hi
At this point I try to use USINE in the simplest way as possible that means controlling VOLUME tracks, MUTE tracks and SOLO tracks and AUX SEND like in DUB music &#8230;I&#8217;m not trying to have one external controller for one single parameter and having 100 parameters to control with only ten fingers&#8230;

So i have SOUND & MIDI tracks to one side and EFFECT tracks to the other side.
I&#8217;m playing with VOLUME, MUTE, SOLO and AUX to send SOUND and MIDI data to the EFFECT tracks.

Now, I hope, you can understand better my request.

To be more precise in the topic:

I suppose when you switch ON the MUTE toggle you stop the sound through the AUDIO OUT module.

What I want is a switch to have the same result but for the MIDI OUT module. Simple ! No ? I&#8217;m joking&#8230;
hi charles

first: usine is NOT simple, it requires a lot of time to investigate. thus the reward is to work with one of the most flexible music apps around :)

"same result for midi out": there is no midi mute GUI element in the track controls (bottom, from left to right)
'S', 'M' etc. are for AUDIO only.
for MIDI mute you need to define a CUSTOM interface module. and here the greatness of usine kicks in: its easy to do!

if you look at my patch graphic (the latter): there is a 'fader' control (read the manual to learn how to generate it), this control will appear (by default) in the GUI section of the selected track (upper middle, above the track audio controls). looking at my graphic: replace Helios2 with a midiOut or a midiDataBus module.
-> there you go.

cybercharles
Member
Posts: 83
Location: Lyon
Contact:

Unread post by cybercharles » 08 Jan 2009, 18:03

Hi AMIGA

you answered me :

"there is no midi mute GUI element in the track controls (bottom, from left to right)
'S', 'M' etc. are for AUDIO only."
This is why I'm telling to Olivier to integrate this feature in the GUI ... Is it not the goal of the suggestion&improvements forum ?

I'm using USINE since 1 year and a half ... anyway thank you for your advises.

See U

Charles
t

amiga909
Member
Posts: 324
Contact:

Unread post by amiga909 » 08 Jan 2009, 18:24

hi charles

sorry, I misunderstood you.

I'd like to see more midi input/output control on the default track sections too.

problem might be: audio out section already is quite occupied.
if audio 'M' also does midi mute it might be sometimes wanted, sometimes not (especially if you got more than 1 midi out).

just as a remark (since I am still trying to learn usine): one could use modules/interfaceControl/usinePanels/mixer track output and automate that midi-mute-behavior with the ideas in this tread.

User avatar
senso
Site Admin
Posts: 4424
Location: France
Contact:

Unread post by senso » 08 Jan 2009, 19:25

this discussion is interesting anyway.
if I resume quickly you want a 'mute midi switch' and eventually a 'midi volume fader' on the mixer.
It's good suggestion and logical with the actual usine structure, but as amiga909 says there is not a lot of room in the out section.
The other pb is that, everything as a cost in CPU terms.

If you have a specific utilization of usine, why don't you create a kind of new personal mix based for example on the /library/touch-screen/bigMixer?

Post Reply

Who is online

Users browsing this forum: No registered users and 10 guests