Page 2 of 4

Re: QL Music

Posted: Sun Jan 23, 2022 7:00 pm
by RalfR
stevepoole wrote:Does anyone know if their exists a font for musical notes for QL systems ?
Nucleon from Pyramide seems to have a font and also a suitable font designer. You can download it from Dilwyn's site.

Re: QL Music

Posted: Sun Jan 23, 2022 8:48 pm
by stevepoole
Thanks Ralf,

I will visit Dilwyn's site and take a look at the Pyramide font.

Also I have resurrected my own music font from a floppy-backed cartridge, and got the associated programs to work under QDOS on SGC.

But for SMSQ/E I need to know the equivalent of charbase=44442, so as to use it on QPC2...

I do have Simon Goodwins chans_code to return channel_base, but don't have the QL font offset.

Does anyone have the offset please ?

Regards, Steve.

Re: QL Music

Posted: Sun Jan 23, 2022 9:19 pm
by dilwyn
http://www.dilwyn.me.uk/program/index.html - scroll down to Nucleon. The font is called music_set.

The offsets you want are 42 and 46 - use CHAN_L(#channel,42) for standard font and CHAN_L(#channel,46) for the extended or second font.

Re: QL Music

Posted: Mon Jan 24, 2022 8:29 am
by NormanDunbar
Or you can USE_FONT() from DJ_Toolkit?

https://superbasic-manual.readthedocs.i ... -font.html

Cheers,
Norm.

Re: QL Music

Posted: Sun Jan 30, 2022 1:49 pm
by stevepoole
Hi Folks,
Derek said << Also how about displaying the notes on a Musical Stave showing which notes are playing >>

Well, I've done it... so UNZIP all three files, LOAD the _bas program, and alter line 5620 to suit your device. Then type PREPARE just once.

RUN and follow the instructions.. but type slowly so as not to overload the input key buffer ! Don't BREAK, but QUIT via the initial menu.

PROGRAM 1 : Choose the music sample to play. Music sample are now accurate. All pitches are now true, but no B1flat exists...

PROGRAM 2 : Nit N to beep the tones. Use the down arrow to alter the parameters & ENTER. (See Line 1400 for music DATA entry Mnemonics).

Tested OK on QPC2, SGC QDOS & SMSQ/E, where it ajusts to any proessor frequency on different systems... Thanks due to Dilwyn for the fonts swapper !
fastStave_bas.zip
(9.52 KiB) Downloaded 75 times
djtk.zip
(124.8 KiB) Downloaded 76 times
font_bytes.zip
(553 Bytes) Downloaded 74 times

Re: QL Music

Posted: Sun Jan 30, 2022 3:36 pm
by Derek_Stewart
Hi Steve,

Nice attempt, but you have got a problem with the DJTK name.

In the fastStave_bas progtame it is called "DJTK_bin" and the actual file is called "DJToolkit_bin", after altering the device for loading, the programme can not find the toolkit.

I just renamed the toolkit to DJTK_bin as in the programme and it ran very nicely...

Re: QL Music

Posted: Sun Jan 30, 2022 6:43 pm
by stevepoole
Hi Derek,
Yes, I noticed that, But whenever I COPY the DJTK_bin, the Full name only gets recorded as DJTK -> ! Is that a problem with QPC2 ?

Sorry you had problems, but thanks for reporting the fix...

By the way, When I load the program into SGC QDOS, The listing contains one MISTake, but not with SMSQ/E. My QL seems to have one dodgy byte, sometimes seen as as a black underscore on screen... But that is easy to work around.

If anyone has any other problems or suggestions, please let me know...

By the way, 'rest' notes are entered in the data lines as -crt, -qvr etc. Negative notes don't get BEEPed !

I have wanted to redo a music program for years, the problem before was always system incompatibilty, now remedied.

The music font was written 20 years ago, and put on the shelf. The two music programs too. Pity I can only modify fonts on my SGC...

The program should be able to play quite complex partitions. (First number each note on your staves before entering DATA, so as to easily find typos).

Hope you get on well with the programs.... Regards, Steve.

Re: QL Music

Posted: Mon Jan 31, 2022 7:05 am
by stevepoole
Hi Derek,

After some checking it would appear that I had renamed Dilwyn's full Toolkit suite as DJTK_bin for the music program!

This is wasteful, as only the code to acces font swapping is necessary....

Perhaps Dilwyn can advise just which sub-files are necessary so I can zip them for the FastStave_bas music notations ?

Then I would like to post the modified DJTK_bin file for the Jan 30th forum entry, so Derek's tweaks won't be necessary any more.

Next I shall cut down the full program, so that music samples can be added to any program at all, ( because FastStave_bas is a neat but comprehensive demo... )

Best Wishes, Steve.

Re: QL Music

Posted: Mon Jan 31, 2022 8:09 am
by NormanDunbar
I wrote DJToolkit at the suggestion of Dilwyn, many many many years ago. I can extract the font handling code if you wish?

Cheers,
Norm.

Re: QL Music

Posted: Mon Jan 31, 2022 9:14 am
by Derek_Stewart
stevepoole wrote:Hi Derek,

After some checking it would appear that I had renamed Dilwyn's full Toolkit suite as DJTK_bin for the music program!

This is wasteful, as only the code to acces font swapping is necessary....

Perhaps Dilwyn can advise just which sub-files are necessary so I can zip them for the FastStave_bas music notations ?

Then I would like to post the modified DJTK_bin file for the Jan 30th forum entry, so Derek's tweaks won't be necessary any more.

Next I shall cut down the full program, so that music samples can be added to any program at all, ( because FastStave_bas is a neat but comprehensive demo... )

Best Wishes, Steve.
Not my tweak? just renamed the toolkit file to suit the programme.