QL Music

Anything QL Software or Programming Related.
User avatar
RalfR
Aurora
Posts: 870
Joined: Fri Jun 15, 2018 8:58 pm

Re: QL Music

Post 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.


4E75 7000
stevepoole
Super Gold Card
Posts: 712
Joined: Mon Nov 24, 2014 2:03 pm

Re: QL Music

Post 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.


User avatar
dilwyn
Mr QL
Posts: 2753
Joined: Wed Dec 01, 2010 10:39 pm

Re: QL Music

Post 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.


User avatar
NormanDunbar
Forum Moderator
Posts: 2251
Joined: Tue Dec 14, 2010 9:04 am
Location: Leeds, West Yorkshire, UK
Contact:

Re: QL Music

Post by NormanDunbar »

Or you can USE_FONT() from DJ_Toolkit?

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

Cheers,
Norm.


Why do they put lightning conductors on churches?
Author of Arduino Software Internals
Author of Arduino Interrupts

No longer on Twitter, find me on https://mastodon.scot/@NormanDunbar.
stevepoole
Super Gold Card
Posts: 712
Joined: Mon Nov 24, 2014 2:03 pm

Re: QL Music

Post 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 51 times
djtk.zip
(124.8 KiB) Downloaded 49 times
font_bytes.zip
(553 Bytes) Downloaded 45 times


Derek_Stewart
Font of All Knowledge
Posts: 3929
Joined: Mon Dec 20, 2010 11:40 am
Location: Sunny Runcorn, Cheshire, UK

Re: QL Music

Post 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...


Regards,

Derek
stevepoole
Super Gold Card
Posts: 712
Joined: Mon Nov 24, 2014 2:03 pm

Re: QL Music

Post 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.


stevepoole
Super Gold Card
Posts: 712
Joined: Mon Nov 24, 2014 2:03 pm

Re: QL Music

Post 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.


User avatar
NormanDunbar
Forum Moderator
Posts: 2251
Joined: Tue Dec 14, 2010 9:04 am
Location: Leeds, West Yorkshire, UK
Contact:

Re: QL Music

Post 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.


Why do they put lightning conductors on churches?
Author of Arduino Software Internals
Author of Arduino Interrupts

No longer on Twitter, find me on https://mastodon.scot/@NormanDunbar.
Derek_Stewart
Font of All Knowledge
Posts: 3929
Joined: Mon Dec 20, 2010 11:40 am
Location: Sunny Runcorn, Cheshire, UK

Re: QL Music

Post 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.


Regards,

Derek
Post Reply