Midi Out?

Everything, that fits not well into other forums - Questions, Talk, Beta-Versions ...
Guest
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1266: count(): Parameter must be an array or an object that implements Countable

Midi Out?

Postby Guest » 15. May 07, 09:21

I would like to know if it possible to in someway make sj output midi stream
ie when stop is pressed (or a song finishes) and when play is pressed (or a song plays), im working on an external app that accepts midi messages only and i need the play/stop states of sj.

Many Thanks

User avatar
Service-Team
Posts: 2448
Joined: 7. Dec 04, 04:48
Location: Germany
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1266: count(): Parameter must be an array or an object that implements Countable

Re: Midi Out?

Postby Service-Team » 15. May 07, 09:42

Guest wrote:
> i need the play/stop states of sj.

You can find out the states using a little plugin which can communicate with your application then - via MIDI, if wanted.

Beside others, some needed functions will be and/or .

Guest
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1266: count(): Parameter must be an array or an object that implements Countable

Re: Midi Out?

Postby Guest » 15. May 07, 10:05

Thanks for the quick reply, i understand what your saying but unfortunatly my coding skills in writing a plugin are nill,im using a modular dsp designing app which im in the process of learning (slowly) so this is a little above me, any help in examples are welcome or a where to start. I know its cheeky of me but i would be able to justify buying sj if i could sort this out.

Regards
Peter

User avatar
Service-Team
Posts: 2448
Joined: 7. Dec 04, 04:48
Location: Germany
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1266: count(): Parameter must be an array or an object that implements Countable

Re: Midi Out?

Postby Service-Team » 15. May 07, 10:23


Guest
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1266: count(): Parameter must be an array or an object that implements Countable

Re: Midi Out?

Postby Guest » 16. May 07, 09:23

Thanks for your inforamtive reply as suggested ive found a command line to midi app but only problem im having is with the correct usage the switches are :
This command line utility sends a single specified MIDI message. It can be used for scripting, or as a poor man's knob box.

Usage: sendmidi [ --out <port> ] ( --note-off <channel> <pitch> <velocity> | --note-on <channel> <pitch> <velocity> | --key-pressure <channel> <pitch> <amount> | --control-change <channel> <number> <value> | --program-change <channel> <number> | --channel-pressure <channel> <amount> | --pitch-wheel <channel> <amount> )

Ive tryed the following without success :
sendmidi.exe --out Midi Yoke NT: 1 --note-on 1 40 127
sendmidi.exe --out "Midi Yoke NT: 1" --note-on 1 40 127
sendmidi.exe --out Midi Yoke NT: 1 (--note-on 1 40 127)
sendmidi.exe --out "Midi Yoke NT: 1" (--note-on 1 40 127)

any idea ??
Thanks
Peter

Guest
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1266: count(): Parameter must be an array or an object that implements Countable

Re: Midi Out?

Postby Guest » 16. May 07, 09:46

Got it working the app see's the midi ports as numbers ie :

sendmidi.exe --out 0 --note-on 1 40 127

Thanks for your code again Service Team looks pefect will give it a try :)

Peter

Guest
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1266: count(): Parameter must be an array or an object that implements Countable

Re: Midi Out?

Postby Guest » 16. May 07, 10:17

New problem :
Error: Execution of command 'sendmidi.exe --out 0 --note-on 1 50 127' failed (error 2: the system cannot find the file specified.)

Tried shortcut placing in the root etc sj doesnt want to see it ??

Any ideas ?

Guest
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1266: count(): Parameter must be an array or an object that implements Countable

Re: Midi Out?

Postby Guest » 16. May 07, 10:19

Sorry thats what sj gives out in the Console if the above wasnt clear :)

Guest
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1266: count(): Parameter must be an array or an object that implements Countable

Re: Midi Out?

Postby Guest » 16. May 07, 10:24

Sorry heres the my sj script :

ar oldPlaying = false;

function myhandler()
{
var nowPlaying = player.isPlaying();
if( nowPlaying != oldPlaying )
{
// here you should do sth. that your external application
// understand. Maybe you find a command line tool that can
// send MIDI events?
if( nowPlaying )
program.run("d:sendmidi.exe --out 0 --note-on 1 50 127");
else
program.run("d:sendmidi.exe --out 0 --note-off 1 50 127");

// remember the new state
oldPlaying = nowPlaying;
}
}

program.setTimeout(myhandler, 1000, true);

:
sendmidi.exe is in the root of d:

Guest
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1266: count(): Parameter must be an array or an object that implements Countable

Re: Midi Out?

Postby Guest » 16. May 07, 13:44

Hi S Team worked it out you must have a bug in sj as the 'program.run' command only lets you use drive c: for the target file!

Thanks


[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1266: count(): Parameter must be an array or an object that implements Countable

Return to “Main Forum”