I’m using: SWI-Prolog version 8.2.4 on debian bookworm
Why I can’t:
tell(’/dev/midi’).
?
Back again and greetings, Gerhard
I’m using: SWI-Prolog version 8.2.4 on debian bookworm
Why I can’t:
tell(’/dev/midi’).
?
Back again and greetings, Gerhard
Did it give you an error when you did it?
Thank you for your quick response!
Last time I’ve written
tell('/dev/midi2'),write(144),write(60),write(64),told.
it gave error messages – not now. I don’t know why. Sorry for the noise. But obviously there is another mistake in the code above.
Grüße, Gerhard
Hi together!
The following code does, what I expect. On other machines midi2 could be midi1 or else.
as
:- 'spiel Akkord'( 60, 58, 55, 52, 2.2 ),
'spiel Akkord'( 60, 57, 53, 51, 2.2 ).
'spiel Akkord'( S, A, T, B, Dauer )
:- m_out( 144, B, 64 ),
m_out( 144, T, 64 ),
m_out( 144, A, 64 ),
m_out( 144, S, 64 ),
sleep( Dauer ),
m_out( 144, B, 0 ),
m_out( 144, T, 0 ),
m_out( 144, A, 0 ),
m_out( 144, S, 0 ).
m_out( I1, I2, I3 )
:- char_code( A1, I1 ),
char_code( A2, I2 ),
char_code( A3, I3 ),
tell( '/dev/midi2' ),
write( A1 ),
write( A2 ),
write( A3 ),
flush_output,
told.
Is there there a way for binary out to avoid char_code/2? It must be, but I don’t find it out.
Grüße, Gerhard
If I understand your problem correctly.
OK; Thanks!