Support

If you have a problem or need to report a bug please email : support@dsprobotics.com

There are 3 sections to this support area:

DOWNLOADS: access to product manuals, support files and drivers

HELP & INFORMATION: tutorials and example files for learning or finding pre-made modules for your projects

USER FORUMS: meet with other users and exchange ideas, you can also get help and assistance here

NEW REGISTRATIONS - please contact us if you wish to register on the forum

Users are reminded of the forum rules they sign up to which prohibits any activity that violates any laws including posting material covered by copyright

how to send Midi Message

For general discussion related FlowStone

how to send Midi Message

Postby Walter Sommerfeld » Sat Mar 19, 2016 9:26 pm

Hi FS users,

i need some help - again...

dunno how i get this Midi Message send in my attached schematic - please have a look!

Keep on Doing!
Walter

P.S.: I left a little gimmick as a thank U => did u found it :)
Attachments
send midi Message + gimmick.fsm
(61.53 KiB) Downloaded 1003 times
User avatar
Walter Sommerfeld
 
Posts: 249
Joined: Wed Jul 14, 2010 6:00 pm
Location: HH - Made in Germany

Re: how to send Midi Message

Postby tulamide » Sat Mar 19, 2016 10:27 pm

There is no midi message. The string @message is just a visualization of an address in RAM, where a midi object once was created by Ruby.
"There lies the dog buried" (German saying translated literally)
tulamide
 
Posts: 2714
Joined: Sat Jun 21, 2014 2:48 pm
Location: Germany

Re: how to send Midi Message

Postby billv » Sat Mar 19, 2016 10:38 pm

Not sure if it helps you Walter...
But I got a result in the Midi Analizer by adding "Midi.new"....
SysEx F0..F7 11 bytes

Code: Select all
def init
   @message = []
end

def event i,v,t
   if i==0
      @message = Midi.new "#<Midi:0x1b21526c>"
      output 0,@message,t #ime
   end
end
billv
 
Posts: 1157
Joined: Tue Aug 31, 2010 3:34 pm
Location: Australia

Re: how to send Midi Message

Postby Walter Sommerfeld » Sun Mar 20, 2016 2:10 pm

@tulamide: I thought so.

@billv: nice idea but - see tulamide's answer...
btw: How are u dude?! Newest project of yours?

Is there a way in FS to record and save/reload Midi sequences?

P.S.: I also need CC's and timing recorded 2 (not only notes)
User avatar
Walter Sommerfeld
 
Posts: 249
Joined: Wed Jul 14, 2010 6:00 pm
Location: HH - Made in Germany

Re: how to send Midi Message

Postby tulamide » Sun Mar 20, 2016 2:36 pm

Walter Sommerfeld wrote:Is there a way in FS to record and save/reload Midi sequences?

P.S.: I also need CC's and timing recorded 2 (not only notes)


Yes, there is. The critical part is the timing. If you are recording premade sequences from the DAW, then you can use the ppq info for the timing. If not, you can only use Ruby's timing, which is reliable down to 10ms.

The basics of a recording are simple. Everything in Ruby is an object, so you can just add the incoming midi object, together with the timing info, to an array. For saving/loading you can use Ruby's marshalling.

I don't have the time to make a demo, but you can find an example of marshalling in my ACM (advanced color manager), where it is used to save the user defined color palettes. Only difference is that you wouldn't save/load on schematic saving/loading, but through some trigger (probably an open/save-dialog).
"There lies the dog buried" (German saying translated literally)
tulamide
 
Posts: 2714
Joined: Sat Jun 21, 2014 2:48 pm
Location: Germany

Re: how to send Midi Message

Postby tulamide » Sun Mar 20, 2016 2:46 pm

I'm very sorry, I just realized that I used marshalling in Apex, where you don't have access to the code. In ACM only the standard schematic marshalling (loadState, saveState) is used.
"There lies the dog buried" (German saying translated literally)
tulamide
 
Posts: 2714
Joined: Sat Jun 21, 2014 2:48 pm
Location: Germany

Re: how to send Midi Message

Postby Walter Sommerfeld » Sun Mar 20, 2016 3:05 pm

Yeah - i heard about the 'Marshall' routine but didn't had the time to look into it...

Maybe someone here can enlighten me and/or give me some good links 4 more info...


Thanks in advance!
Walter

btw: will have a look into ur ACM...
User avatar
Walter Sommerfeld
 
Posts: 249
Joined: Wed Jul 14, 2010 6:00 pm
Location: HH - Made in Germany

Re: how to send Midi Message

Postby tulamide » Sun Mar 20, 2016 3:30 pm

My source of choice for Ruby is always ruby-doc.org

Here are 2 pages that you need to use marshalling and saving/loading:
http://ruby-doc.org/core-1.9.3/Marshal.html
http://ruby-doc.org/core-1.9.3/IO.html

On the first page you'll want to read everything, but the keywords are dump and load
On the second page you'll be interested in binread and binwrite

Combined it is really easy to create files that contain the current state of any object, for example:

Code: Select all
IO.binwrite("myfilename.myending", Marshal.dump(myobject))
# writes a serialized binary version of myobject to the file myfilename.myending


Code: Select all
myobject = Marshal.load(IO.binread("myfilename.myending"))
# loads back the serialized object from the file
"There lies the dog buried" (German saying translated literally)
tulamide
 
Posts: 2714
Joined: Sat Jun 21, 2014 2:48 pm
Location: Germany

Re: how to send Midi Message

Postby Walter Sommerfeld » Sun Mar 20, 2016 3:34 pm

Thanks Tom => really appreciate your help!

Had a look there already now and i'll give it a go... ;-)

Cheers,
Walter

=> done - It works like a charm :)
U saved my day!
User avatar
Walter Sommerfeld
 
Posts: 249
Joined: Wed Jul 14, 2010 6:00 pm
Location: HH - Made in Germany

Re: how to send Midi Message

Postby tulamide » Mon Mar 21, 2016 1:11 am

Walter Sommerfeld wrote:=> done - It works like a charm :)
U saved my day!

GREAT! Nice to have feedback, and impressive that you could work it out without real demos!
"There lies the dog buried" (German saying translated literally)
tulamide
 
Posts: 2714
Joined: Sat Jun 21, 2014 2:48 pm
Location: Germany

Next

Return to General

Who is online

Users browsing this forum: No registered users and 66 guests