dMZX Forums: [Req. file] Octave range in sound commands increased to 8th octave -> Rejected Requests -> Tracker

Jump to content

Report ID 656 Title [Req. file] Octave range in sound commands increased to 8th octave
Product Rejected Requests Status Closed - No Change (Severity 0 - None Assigned)
Version - Fixed in -

Page 1 of 1
  • Cannot start a new Issue
  • Closed Issue This issue is locked

Report ID #656: [Req. file] Octave range in sound commands increased to 8th octave

#1 User is offline  
Lachesis 

  • the pinnacle of human emotion
  • Group: DigiStaff
  • Posts: 3,904
  • Joined: 17-July 04
  • Gender:Female
  • Location:Sealand

Posted 28 June 2017 - 05:46 PM

No additional explanation.
"Let's just say I'm a GOOD hacker, AND virus maker. I'm sure you wouldn't like to pay for another PC would you?"

xx̊y (OST) - HELLQUEST (OST) - Zeux I: Labyrinth of Zeux (OST) (DOS OST)
w/ Lancer-X and/or asgromo: Pandora's Gate - Thanatos Insignia - no True(n) - For Elise OST
MegaZeux: Online Help File - Keycode Guide - Joystick Guide - Official GIT Repository


Page 1 of 1  
  • Cannot start a new Issue
  • Closed Issue This issue is locked

Replies (1 - 5)

#2 User is offline  
Lachesis 

  • the pinnacle of human emotion
  • Group: DigiStaff
  • Posts: 3,904
  • Joined: 17-July 04
  • Gender:Female
  • Location:Sealand

Posted 25 February 2019 - 10:07 PM

Update on this: While making music for Lancer's ZZT game using MZX's play command, I've found the upper octave 6 notes are so shrill that I'm not sure there's much benefit to introducing even higher notes (they might be useful for SFX, but definitely not music...).
"Let's just say I'm a GOOD hacker, AND virus maker. I'm sure you wouldn't like to pay for another PC would you?"

xx̊y (OST) - HELLQUEST (OST) - Zeux I: Labyrinth of Zeux (OST) (DOS OST)
w/ Lancer-X and/or asgromo: Pandora's Gate - Thanatos Insignia - no True(n) - For Elise OST
MegaZeux: Online Help File - Keycode Guide - Joystick Guide - Official GIT Repository

#3 User is offline  
Lachesis 

  • the pinnacle of human emotion
  • Group: DigiStaff
  • Posts: 3,904
  • Joined: 17-July 04
  • Gender:Female
  • Location:Sealand

Posted 13 March 2019 - 07:48 AM

Updating status to: Closed - No Change

Update 2: the period values used for sound effects with notes in octave 6 in are already so low that they're starting to get inaccurate. There's also a problem with implementing this just for play notes, which also start to get inaccurate at high values depending on the current sampling rate.

B6 (actually B7) is the highest note MZX can play, which has a frequency of 3840Hz (MZX uses approx. 428Hz tuning for the PC speaker). To summarize since the code seems to have been written with obfuscation in mind: the PC speaker is implemented as an overflow of a 32-bit unsigned integer of which the MSB determines whether the current value is high/low. The the amount this integer is incremented is proportional to (Note freq)/(Sampling rate). For B6 at 44100Hz, this is

3840Hz / 44100Hz ≈ 0.0871

For the highest note currently possible at the sampling rate most people are probably using, this waveform repeats after ≈11.5 samples, and this is only going to shrink as the pitch increases further. This can also be observed by generating a square wave in Audacity and zooming in. As the number of samples per period decreases, so will the accuracy of the note. The effect will be even worse for those using lower sampling rates like 22050Hz.

Also, this note is already probably as shrill as anyone needs for any reasonable purpose.

Closing this with the option of it being revisited if someone has a good excuse for adding it.
"Let's just say I'm a GOOD hacker, AND virus maker. I'm sure you wouldn't like to pay for another PC would you?"

xx̊y (OST) - HELLQUEST (OST) - Zeux I: Labyrinth of Zeux (OST) (DOS OST)
w/ Lancer-X and/or asgromo: Pandora's Gate - Thanatos Insignia - no True(n) - For Elise OST
MegaZeux: Online Help File - Keycode Guide - Joystick Guide - Official GIT Repository

#4 User is offline  
Lachesis 

  • the pinnacle of human emotion
  • Group: DigiStaff
  • Posts: 3,904
  • Joined: 17-July 04
  • Gender:Female
  • Location:Sealand

Posted 13 March 2019 - 08:06 AM

Here's the original reason this was requested for reference:

Quote

Again!

I'd like the octave range in sound commands to be raised to the 8th octave (as opposed to the current 6th). It's less idiotic of a request than it seems, considering MZX handles WAVs and OGGs now, and 44.1KHz/48KHz just barely makes it into the end of the 6-octave range, making speedup sound manipulation of OGG/WAVs somewhat limited. (Mathematically, extending the octave range by two will allow 192KHz wavs/oggs to be played at/near native speeds with octave settings, but that's a benefit that I don't see being used for pretty obvious reasons. 96KHz is comparatively feasible, sort of. The extension to eight octaves is simply because it's more "natural" than seven.)


I'm still not convinced we'd gain much here.
"Let's just say I'm a GOOD hacker, AND virus maker. I'm sure you wouldn't like to pay for another PC would you?"

xx̊y (OST) - HELLQUEST (OST) - Zeux I: Labyrinth of Zeux (OST) (DOS OST)
w/ Lancer-X and/or asgromo: Pandora's Gate - Thanatos Insignia - no True(n) - For Elise OST
MegaZeux: Online Help File - Keycode Guide - Joystick Guide - Official GIT Repository

#5 User is offline  
Terryn 

  • ******
  • Group: DigiStaff
  • Posts: 2,961
  • Joined: 12-October 00
  • Gender:Male

Posted 13 March 2019 - 08:53 AM

Agreed. Just use SAM #.
angelic stream - shed sanguine - ill-adapt - avis - para/lyser - renaissance - dead tangent - phosphene blur - birth breeds death - ________ - painted glass - lagniappe

<Exophase> HES STEALING MAH AIRSHIP!!!!!!11111111

#6 User is offline  
Terryn 

  • ******
  • Group: DigiStaff
  • Posts: 2,961
  • Joined: 12-October 00
  • Gender:Male

Posted 23 July 2019 - 12:29 AM

Moving to: Rejected Requests


Page 1 of 1
  • Cannot start a new Issue
  • Closed Issue This issue is locked

1 User(s) are reading this issue
1 Guests and 0 Anonymous Users


Powered by IP.Tracker 1.3.2 © 2024  IPS, Inc.