QL Tinkering

Helpful tips and guides, also new users can ask for help here.
User avatar
bwinkel67
QL Wafer Drive
Posts: 1519
Joined: Thu Oct 03, 2019 2:09 am

Re: QL Tinkering

Post by bwinkel67 »

Andrew wrote: Sat Jul 27, 2024 6:17 pm The spritesheet for QStar is this:
SpriteSheet.jpg
SpriteSheet.jpg (101.9 KiB) Viewed 4867 times
Hi Andrew,

In your sprite sheet I noticed that the speaker icon has the background inside of the speaker (assuming that's part of the speaker). Is that supposed to be that way, or should it be all white?

sound.png
sound.png (8.73 KiB) Viewed 4867 times

Or is that supposed to be a sound wave? If that, then should those two white pixels be light blue and green?

I like that icon and was using it while I noticed that discrepancy...


User avatar
Andrew
QL Wafer Drive
Posts: 1033
Joined: Tue Jul 17, 2018 9:10 pm

Re: QL Tinkering

Post by Andrew »

bwinkel67 wrote: Wed Jul 31, 2024 5:55 am In your sprite sheet I noticed that the speaker icon has the background inside of the speaker (assuming that's part of the speaker). Is that supposed to be that way, or should it be all white?
There is no specific reason for it. At the time it just looked better to me this way than all white. Let's just call it "an artistic touch" :D


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

Re: QL Tinkering

Post by Derek_Stewart »

Andrew wrote: Wed Jul 31, 2024 11:11 am
bwinkel67 wrote: Wed Jul 31, 2024 5:55 am In your sprite sheet I noticed that the speaker icon has the background inside of the speaker (assuming that's part of the speaker). Is that supposed to be that way, or should it be all white?
There is no specific reason for it. At the time it just looked better to me this way than all white. Let's just call it "an artistic touch" :D
looks okay to me.

I like the fact I do not have slow the Q68 down to play Pitman, using the default settings works great.

Truely a most excellent game.


Regards,

Derek
qbits
Gold Card
Posts: 252
Joined: Sun Dec 11, 2016 3:32 pm

Re: QL Tinkering

Post by qbits »

Hi,

QBITS QLSoundSE some minor changes... Note AZERTY keyboard

QBITS
Attachments
QB06_QLSoundSE_WIP.zip
(1.44 MiB) Downloaded 170 times


User avatar
Mark Swift
Bent Pin Expansion Port
Posts: 86
Joined: Fri Jul 18, 2014 9:13 am
Location: Blackpool, Lancs, UK
Contact:

Re: QL Tinkering

Post by Mark Swift »

Hi Qbits,
While playing aound with QBITS_QLsounds I noticed a couple of bugs.

Take these two Score files:
QBS_SpanishFoliesPT1.zip
(491 Bytes) Downloaded 228 times
QBS_SpanishFoliesPT2.zip
(467 Bytes) Downloaded 166 times

The tempo on the files is set as 144 beats/minute, but the speed of play back is quite slow.
Also many notes in the score file "QBS_SpanishFoliesPT2" are skipped.

This is due to the way that the score note duration is read in from file.
The duration value is read into an integer variable but the value itself is a float.

Code: Select all

1426       nv%=Score(l,n,4):dur=3000*nv%/mn%:del=5
This causes Quaver notes (0.5) to be rounded up to Crotchet (1.0), and Semiquaver notes (0.25) to be rounded down to nothing, etc...

The also affects score creation, due to the program assigning a float to an integer variable on the following lines.

Code: Select all

1462  = 0:nv%=0                 :N$='Space'
1463  = 1:nv%=0  :EBar          :N$='End Bar'
1464  = 2:nv%=0  :SBar          :N$='Bar Seperator'
1465  = 3:nv%=4  :SBRest        :N$='Semibreve Rest'
1466  = 4:nv%=2  :MRest         :N$='Minim Rest'
1467  = 5:nv%=1  :CRest         :N$='Crotchet Rest'
1468  = 6:nv%=.5 :QRest         :N$='Quaver Rest'
1469  = 7:nv%=.25:QRest:SRest   :N$='SemiQuaver Rest'
1470  = 8:nv%=4  :Semibreve     :N$='Semibreve'
1471  = 9:nv%=3  :Minim    :Dot :N$='Minim+Dot'
1472  =10:nv%=2  :Minim         :N$='Minim'
1473  =11:nv%=1.5:Crotchet :Dot :N$='Crotchet+Dot'
1474  =12:nv%=1  :Crotchet      :N$='Crotchet'
1475  =13:nv%=.75:Quaver:Dot    :N$='Quaver+Dot'
1476  =14:nv%=.5 :Quaver        :N$='Quaver'
1477  =15:nv%=.25:Semiquaver    :N$='Semiquaver'

To FIX - replace all occurrences of nv% in the program with nv.

Once that is fixed, play back the score file "QBS_SpanishFoliesPT2" again. It's still a little pedestrian.
This is due to "del=5" on line 1426 which adds an extra 5/50 secs to every standard note.
Staccato and Tenuto note timings are similarly skewed.

To FIX - update lines 1426 to 1428 as follows, which adds note articulation without changing note duration

Code: Select all

1426       nv=Score(l,n,4):dur=int(3000*nv/mn%+0.5):del=0 :REMark Tenuto
1427       IF  Score(l,n,3)=1:del=int(dur/2):dur=dur-del  :REMark Staccato
1428       IF  Score(l,n,3)=0:del=int(dur/4):dur=dur-del  :REMark Standard note
Thanks for a great program.


User avatar
bwinkel67
QL Wafer Drive
Posts: 1519
Joined: Thu Oct 03, 2019 2:09 am

Re: QL Tinkering

Post by bwinkel67 »

Great debugging. I think I ran into those issues when I did a video on it a few years back. I had to change the notes to make it work on a BBQL. I will try your fixes to see if it improves it. Unfortunately I have a specialized version that scales the display for JSU ROMs (otherwise 1/4 of the display disappears) and also compiled it to run a bit faster, so I will try and it on that.


stevepoole
Aurora
Posts: 889
Joined: Mon Nov 24, 2014 2:03 pm

Re: QL Tinkering

Post by stevepoole »

Hi Qbits, Mark, Bwinkel,

Yes, bravo! I like the front-end of Ql_Sounds too. But there are a couple of points I would like to make :
Beep durations should allow high-tempo demi-semi-quavers and rests. This is not possible, when rests are timed using PAUSEs.

In my attempts at classical music, I had to use BEEPING with 'wait-loops : (FOR loops), which are processor- dependant.
That meant writing a routine which would adapt itself to any system, running any overheads : Job done and tested ok.

My program is not as good as Qbits, in that he has progressed much further with note inputs on scores, wave-forms etc.
Moreover, I use a two-finger keyboard system, allowing trilled 'duo' effects as well as timbres. ( With a Beep-parameter section).

I will give it a once-over and post it so you can see how the music fares in comparison, on any system.
There are a couple of 1990s score players too, but as they are old, they were not very complex... Regards, Steve.
______________________________________________________________________________________________________


qbits
Gold Card
Posts: 252
Joined: Sun Dec 11, 2016 3:32 pm

Re: QL Tinkering

Post by qbits »

Hi Mark, Steve, Bwinkel67

Your interest and input is much appreciated. :ugeek:

Well Mark and Stev not having much of an ear for notes and tonal quality or any musical talent perse, QLSounds was a lot of guess work so any further collaboration for the next release where I can acknowledge your input and especially if progress involves the QPC2 and AY-3-8910 emulation will be a big plus. On that Note (sorry no pun intended ;) ) Steve look forward to your posting.

Perhaps a novice yourself Bwinkl67, but I judge you to be more musically advanced than myself and did very much enjoy your Y-Tube assessment of QL Sounds https://youtu.be/aBdqAv9oPmI

Update Mark,
I played your SpanishFoliesPT2 and note Jumps are as you said.

QBITS QLSounds – Playback of Notes/Rests: BEEP d,p,h,t,s,w,f,r.:PAUSE duration : BEEP :PAUSE delay

BEEP duration controlled by a PAUSE and BEEP to end, then a delay PAUSE before start of next Note/Rest.

With each PAUSE being a multiple of 20 msec ie PAUSE 5 = 100 milliseconds this being the time for the average human ear to recognise a sound. For tonal qualities this would be in the area 180 msec.

Score(sl%,sn%,sp%) Score Sheet Array sl% 0..9, Stave lines/rows sn% 0..,23 position number sp% 0..4 parameters

sp% ,0)=n% keyboard key 0..47
sp% ,1)=ds Score Symbol 0-15:
sp% ,2)=ar% articulations sp% ,2)=1-Staccato sp% ,2)=2-Tenuto [ sp% ,1)>1; Notes with dot / legato etc ]
sp% ,3)=0
sp% ,4)=nv% Note/Rest value 4 .. 0.25 [Beat value]

Your suggested changes alters the timing and ID of articulates that I feel doesn’t quite fit with my present coding.

1426 nv%=Score(l,n,4):dur=3000*nv%/mn%:del=5..............nv=Score(l,n,4):dur=int(3000*nv/mn%+0.5):del=0 :REMark Tenuto
1427 IF Score(l,n,3)=1:del=8:dur=dur -1 :REMark Staccato'..IF Score(l,n,3)=1:del=int(dur/2):dur=dur-del :REMark Staccato
1428 IF Score(l,n,3)>1:del=2:dur=dur+2 :REMark Tenuto.....IF Score(l,n,3)=0:del=int(dur/4):dur=dur-del :REMark Standard note
1429 IF ds<8:PAUSE dur+del
1430 IF ds>7:BRead:BEEP 0,p,h,t,s,w,f,r:PAUSE dur:BEEP:PAUSE del

However I have changed: 1426 nv=Score(l,n,4):dur=INT(3000*nv/mn%):del=4
SEntry 1372 na%=36+sn%*7:DSymbol :Score(l%,sn%,4)=nv:ac%=0:ar%=0:SChg mp%, and DSymbol lines 1462 - 1477 ie nv% to nv

This has solved the non-playing of notes: Thanks again for your imput.

QBITS
Attachments
QBITS_QLSoundSE_WIP.zip
(11.56 KiB) Downloaded 156 times
QB06_QLSoundSE_WIP.pdf
(1.56 MiB) Downloaded 153 times
QSounds.jpg


User avatar
Mark Swift
Bent Pin Expansion Port
Posts: 86
Joined: Fri Jul 18, 2014 9:13 am
Location: Blackpool, Lancs, UK
Contact:

Re: QL Tinkering

Post by Mark Swift »

Hi Qbits,
qbits wrote: Sun Aug 04, 2024 11:41 am Your suggested changes alters the timing and ID of articulates that I feel doesn’t quite fit with my present coding.
Understandable. It was a crude attempt to even out the beats per minute (BPM).
Given mn%=144, note below how the BPM varies between note types:

Tenuto CROTCHET: dur=22 del=2 bpm=125
Tenuto QUAVER: dur=12 del=2 bpm=107
Tenuto SEMIQUAVER: dur=7 del=2 bpm=83

Standard CROTCHET: dur=20 del=4 bpm=125
Standard QUAVER: dur=10 del=4 bpm=107
Standard SEMIQUAVER: dur=5 del=4 bpm=83

Staccato CROTCHET: dur=19 del=8 bpm=111
Staccato QUAVER: dur=9 del=8 bpm=88
Staccato SEMIQUAVER: dur=4 del=8 bpm=62

BPM is the number of quarter notes (crotchets) that can be played in one minute.
Because the BPM varies between crotchet, quaver and semiquaver ; the rhythm of the score is affected and playback appears to stutter. This is particularly noticeable on QBS_SpanishFoliesPT2.

...there's probably a way to even out the BPM that keeps the notes closer to your original coding.

Mark


stevepoole
Aurora
Posts: 889
Joined: Mon Nov 24, 2014 2:03 pm

Re: QL Tinkering

Post by stevepoole »

Hi Guys,
Here is the 'Ivories' program after a once-over to improve the interface. Tested Ok one QPC2, SGC, QDOS & Smsq/E. UNZIP & LRUN.

Note: Keying-in is slower on SGC, but is always faster with the option (S)ilence. Keys F1/F2 & F3/F4 are QWERTY & AZERTY-compatible...

To flip 'Buzz', 'Trill', 'left' & 'right' parameters (0/1), just hit ENTER to 'NOT' them. The 'Katie Morey' song is possibly copyrighted ?

(These two linked programs do not 'BEEP duration,pitch', but 'BEEP 0,pitch: wait delay', where the delay is processor-compatible.)
This scheme allows more accurate tempos and time-signatures, from Brieve down to demisemiquaver !

Still a work in progress, and less advanced than the Qbits interface, but may be food for thought ? Regards, Steve.
Ivories5.zip
(7.07 KiB) Downloaded 150 times


Post Reply