bertram Power User

Joined: 13 Nov 2005 Posts: 52
|
Posted: Wed Apr 11, 2012 11:59 am Post subject: create and play a MIDI file ... |
|
|
1. is there a way to open a shell and execute a local .exe program from within a macro?
a macro could be used to write a text file to disk, for example "CloseEncounters.csv" | Code: | ;the 5-note motif from Close Encounters of the Third Kind
;using an organ patch from the General MIDI instrument set
0, 0, Header, 1, 2, 480
1, 0, Start_track
1, 0, Title_t, "Close Encounters"
1, 0, Text_t, "Sample for MIDIcsv Distribution"
1, 0, Copyright_t, "This file is in the public domain"
1, 0, Time_signature, 4, 2, 24, 8
1, 0, Tempo, 500000
1, 0, End_track
2, 0, Start_track
2, 0, Instrument_name_t, "Church Organ"
2, 0, Program_c, 1, 19
2, 0, Note_on_c, 1, 79, 81
2, 960, Note_off_c, 1, 79, 0
2, 960, Note_on_c, 1, 81, 81
2, 1920, Note_off_c, 1, 81, 0
2, 1920, Note_on_c, 1, 77, 81
2, 2880, Note_off_c, 1, 77, 0
2, 2880, Note_on_c, 1, 65, 81
2, 3840, Note_off_c, 1, 65, 0
2, 3840, Note_on_c, 1, 72, 81
2, 4800, Note_off_c, 1, 72, 0
2, 4800, End_track
0, 0, End_of_file |
Can I then open a shell and run a small local executable on that file?
fourmilab.ch has a utility that will convert csv to midi ... found at http://www.fourmilab.ch/webtools/midicsv/#csvmidi.1)
| Code: | | shell( "csvmidi.exe CloseEncounters.csv CloseEncounters.mid") |
for music studies, it would neat to be able to write a macro that generates a midi file based on values in a spreadsheet ...
2. If I can get a shell to run the .exe, then is it possible to play a midi file by a command from a macro or a dialog?
thanks if you have any thoughts!! |
|