QL Music

Anything QL Software or Programming Related.
stevepoole
Super Gold Card
Posts: 712
Joined: Mon Nov 24, 2014 2:03 pm

QL Music

Post by stevepoole »

Hi Folks,

The latest 'wait timer' routine worked fine on any system I have been able to test it on. It is fully backward compatible, so :

I dug out an old music prototype program I had abandoned, and adapted it to use the new wait routine, so it too now runs under any system !

Unzip, Lrun and choose a simple music sample. (There are still some inaccuracies in the playback, as I am poor at reading music sheets).

If anyone is interested, I will try to improve the program still further. Please let me know...

Three octaves, tempos and even dotted rest notes are catered for, so the result is getting quite accurate, ( but unfortunately I am no musician).

Work in progress, Regards, Steve.
QL_TUNE2_bas.zip
(3.16 KiB) Downloaded 75 times


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 always thought that the BEEP command was a pointless exercise -- and that QL and Music didn't really go together. Maybe I am/was useless at music anyway and it's not the QL's fault but mine.

I tried your code on QPC2 5.01 and it was, unfortunately, not good. Lots of "white noise" over the top making the music pretty much unrecognisable. Jingle Bells was the worst, completely distorted.

QPC2 5.01 on Linux Mint 20.3.
Dell Vostro 1720, dual core, 16+ years old!

Maybe not the best platform for QL Music? Most likely, Linux not being real time is not helping.

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 Norm,

I developed the prototype program on an ASUS Laptop using Windows 8.1, with QPC2, and on my SGC under QDOS and SMSQ/E, where it works fine.

It should be ok using Qemulator or a 128ko QL, but no doubt much depends on the sound generator your PC addresses...

There was no 'white noise' using my setups, so perhaps the problem is due to linux ?

Thanks for the feedback though. ( I have contacted an experienced musician who is helping me to master partitions completely! )

Regards; 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 suspect the Linux scheduler is the problem. It's not real time enough.
Not that I'm an expert on these matters though.

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.
User avatar
XorA
Site Admin
Posts: 1359
Joined: Thu Jun 02, 2011 11:31 am
Location: Shotts, North Lanarkshire, Scotland, UK

Re: QL Music

Post by XorA »

NormanDunbar wrote:I suspect the Linux scheduler is the problem. It's not real time enough.
Not that I'm an expert on these matters though.

Cheers,
Norm.
Run as root and use nice to increase the priority of the task.


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

Re: QL Music

Post by stevepoole »

Hi

My musician contact has pointed out that there are slight differences between english and french music notation, hence the slight blips on replay.

I will redo the DATA entries to correct this.

Steve.
_______________


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

Re: QL Music

Post by Derek_Stewart »

Hi,

Work great with QPC v5.02 SMSQ/E v3.38 Linux Mint 19.3 Wine 7.0, Q-emulator v3.4

No sound on SMSQmulator or sQLux as expected.

Can you update the menu selection?

Also how about displaying the notes on a Musical Stave showing which notes are playing.

DO you think QPC2 3 Channel Sound could do a good job hear?


Regards,

Derek
User avatar
mk79
QL Wafer Drive
Posts: 1349
Joined: Sun Feb 02, 2014 10:54 am
Location: Esslingen/Germany
Contact:

Re: QL Music

Post by mk79 »

Derek_Stewart wrote:DO you think QPC2 3 Channel Sound could do a good job hear?
It could, but unfortunately the basic commands are broken currently. I will fix it in the next SMSQ/E.


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

Re: QL Music

Post by stevepoole »

Hi Folks,

In response to Derek's comments, I have modified an old piano keyboard program to demo a stave, for a duo beep parameters experimenter.

UNZIP, LRUN then study the menu. (Do not try to use EX with SMSQ/E...). Start by hitting right arrow, then N for noise, then P for parameters.

NB: Only numeric inputs please. Ensure y_steps are exact divisors of X_durations. Wrap, Rnd & Fuzzy have no effect...

Note durations are cross-platform compatible WAIT loops. Bottom parameters are only the note mnemonics for info !

I will try to combine this program with the QL_Tune2_bas music player, posted earlier this week.

Please let me know if you get any problems. ( Tested on QPC2 and SGC - QDOS & SMSQ/E )

Regards, Steve.
Ivories2_bas.zip
(4.11 KiB) Downloaded 53 times


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

Re: QL Music

Post by stevepoole »

Hi Folks,

Does anyone know if their exists a font for musical notes for QL systems ?

I did start making one many years ago, but am finding it difficult to recover it from an old cartridge, together with the font designer code used...

Any advice would be appreciated !

Steve.
__________________


Post Reply