Hi,

This is great news to hear that somebody is finally trying to use MIDI
in Liquidsoap! The example is not correct anymore because typing is
more strict in newer version of Lqiuidsoap (I should update the
doc...). The error you get

> At line 6, char 42:
>   this value has type
>     source(,midi=1+_,...) (infered at line 5, char 18-20)
>   but it should be a subtype of
>     source(,midi=0,...)

means that out.icecast wants a source with only audio (and no MIDI)
whereas your source obviously has a MIDI channel. The solution is
simply to drop the MIDI channel by inserting

> !#/usr/local/bin/liquidsoap
> s = single("/music/music.mid")
> s = midi.remove([9],s)
> s = mux_audio(audio=blank(),s)
> s = synth.all.saw(s)

s = drop_midi(s)

> out.icecast(%mp3,blah blah blah,s)

and it should work :)

> As i get this, mux_audio adds a blank audiochannel  source(audio=1+,)
> to the source.
> and then synth.all.saw modulates this audio channel according
> to the notes in the midi-channel.

Yes, this is exactly the right scenario.

Out of curiosity, do you have any specific application in mind? I have
big plans for audio synthesis in Liquidsoap but never really got
motivated enough to implement them because nobody seemed to care...
So, don't hesitate to ask if you are missing some things...

Cheers,

Samuel.

------------------------------------------------------------------------------
10 Tips for Better Server Consolidation
Server virtualization is being driven by many needs.  
But none more important than the need to reduce IT complexity 
while improving strategic productivity.  Learn More! 
http://www.accelacomm.com/jaw/sdnl/114/51507609/
_______________________________________________
Savonet-users mailing list
Savonet-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/savonet-users

Reply via email to