im just using the note on and note off....lol
i guess the volume and pan and the modulation functions too
Do you want to help with this project to get the midi file save working? I just want everybody to have a free midi editor to make music for there games
I want to put you in the credits.....Just Rudolpho or do you have another name i should mention?
all of the bottom tool bar stuff was temporary just to get the thing working.
here is my code play back and maby you could figure out how we could save this all as a midi file.
updateplay:
temp=val(getgadgettext(ed3))
temp=250-temp
temp=temp*2
if timer()-tmdelay<=temp then return
left_over=timer()-tmdelay+temp
tmdelay=timer()+leftover:
if timer()-tmdelay>=temp then tmdelay=timer()
`temp
qrepeat=getchecked(rept)
size=val(getgadgettext(ed5))
if playbar>size then playing=0:
if playing=0 and qrepeat=1 then playing=1:playbar=0:`if getchecked(rep2)=1 then setscrollbarposition sbar,0
if playing=0 then gosub offnotes:return
for x=1 to 120
for t=1 to 10
if playin(x,t,0)=1 then playin(x,t,1)=playin(x,t,1)-1:if playin(x,t,1)=<0 then midi note off midi,x,t:playin(x,t,0)=0:playin(x,t,1)=0:
next t
next x
for x=1 to 10
vol=vol(x)
vol=vol+vol
set channel volume midi,x,vol
modu=modual1(x)
modu=modu+modu
set modwheel midi,x,modu
set midi instrument midi,x,instrument(x)
panboy=pan1(x)
if panboy=3 then set channel pan midi,x,64
if panboy=6 then set channel pan midi,x,128
if panboy=0 then set channel pan midi,x,0
if panboy=1 then set channel pan midi,x,25
if panboy=2 then set channel pan midi,x,50
if panboy=4 then set channel pan midi,x,85
if panboy=5 then set channel pan midi,x,110
for y=0 to 27
if music(playbar,x,y,0)=1 then midi note off midi,music(playbar,x,y,2),x:midi note on midi,music(playbar,x,y,2),x,100:playin(music(playbar,x,y,2),x,1)=16:playin(music(playbar,x,y,2),x,0)=1
if music(playbar,x,y,0)=2 then midi note off midi,music(playbar,x,y,2),x:midi note on midi,music(playbar,x,y,2),x,100:playin(music(playbar,x,y,2),x,1)=8:playin(music(playbar,x,y,2),x,0)=1
if music(playbar,x,y,0)=3 then midi note off midi,music(playbar,x,y,2),x:midi note on midi,music(playbar,x,y,2),x,100:playin(music(playbar,x,y,2),x,1)=4:playin(music(playbar,x,y,2),x,0)=1
if music(playbar,x,y,0)=4 then midi note off midi,music(playbar,x,y,2),x:midi note on midi,music(playbar,x,y,2),x,100:playin(music(playbar,x,y,2),x,1)=2:playin(music(playbar,x,y,2),x,0)=1
if music(playbar,x,y,0)=5 then midi note off midi,music(playbar,x,y,2),x:midi note on midi,music(playbar,x,y,2),x,100:playin(music(playbar,x,y,2),x,1)=1:playin(music(playbar,x,y,2),x,0)=1
next y
next x
playbar=playbar+1
return
if you want to try loading this song in here this is how to load the song
code snippet from qmidis file format for loading
loadsong:
file$=opendialog("Open Midi Song","Qmidi... [*.QMD]|*.qmd|Midi... [*.MID]|*.mid|Qmidi ENC... [*.QME]|*.qme",0,"music")
if file$="" then return
if right$(file$,3)="mid" then message "This format will be available soon... Please load using the regular format for now until i resolve a few midi issues":goto loadsong
if right$(file$,3)="qme" then message "This format will be available soon... Please load using the regular format for now until i finish programing this in":goto loadsong
`reg format
if file exist(file$)=0 then return
open to read 1,file$
size=val(getgadgettext(ed5))
read string 1,dumby$:`"QMIDI 1.0"
read long 1,size
setgadgettext ed5,str$(size)
read long 1,tempo
setgadgettext ed3,str$(tempo)
for x=0 to size
for y=0 to 27
for t=1 to 10
for b=0 to 2
read byte 1,music(x,t,y,b)
next b
next t
next y
next x
for x=1 to 10
read byte 1,instrument(x)
read byte 1,vol(x)
read byte 1,pan1(x)
read byte 1,modual1(x)
next x
close file 1
settrackbarposition trackedt,1
settrackbarposition pan,pan1(1)
settrackbarposition vol1,vol(1)
settrackbarposition modul,modual1(1)
settrackbarposition trackins,instrument(1)
activetrack=1
return
if you could help out and give me some ideas or direction that would be great