uef2wav.py

discussion of beeb/electron applications, languages, utils and educational s/w
User avatar
vanekp
Posts: 341
Joined: Thu Nov 30, 2000 7:09 am
Location: The Netherlands

uef2wav.py

Postby vanekp » Mon Oct 30, 2017 9:46 pm

The version :-
Name : uef2wave
Author : Wouter Hobers
Created : May 21 2001
Last edited : May 23 2001
Purpose : Convert tape blocks of UEF files to WAVE files so they can be
recorded on tape and used with a real Electron.
WWW : http://www.fmf.nl/~xaviar/acorn/ (side no longer exists)
works fine with normal UEF files but not with High Quality UEF's I don't suppose there is a newer updated version of it around anywhere (I could not fine one) that does work with hq.uef files ?
Peter.

User avatar
8bitkick
Posts: 68
Joined: Thu Aug 11, 2016 4:45 pm
Location: California
Contact:

Re: uef2wav.py

Postby 8bitkick » Tue Oct 31, 2017 2:49 am

vanekp wrote:The version :-
Name : uef2wave
Author : Wouter Hobers
Created : May 21 2001
Last edited : May 23 2001
Purpose : Convert tape blocks of UEF files to WAVE files so they can be
recorded on tape and used with a real Electron.
WWW : http://www.fmf.nl/~xaviar/acorn/ (side no longer exists)
works fine with normal UEF files but not with High Quality UEF's I don't suppose there is a newer updated version of it around anywhere (I could not fine one) that does work with hq.uef files ?
Peter.


If this is to play existing games, I've made a free web-based UEF to high quality WAV converter in Javascript (partly inspired by uef2wave) which might help? Select a game title at http://www.8bitkick.cc/PlayUEF.html. It loads a cassette player. Press the cassette and it will download a high quality WAV of the game (or alternately, you can just press play in the browser...probably easier)

I'm not sure what you mean by HQ UEFs, but if it doesn't support them let me know!

EDIT
PlayUEF only currently supports basic chunk types: &0100, &0110 and &0111... is there a particular game you are trying to load that needs the advanced chunk types? (I am guessing this might be called HQ UEF!!) If there is a specific image you are trying to load I can put the necessary chunk types on my 'to-do' list...

:D

Image

User avatar
vanekp
Posts: 341
Joined: Thu Nov 30, 2000 7:09 am
Location: The Netherlands

Re: uef2wav.py

Postby vanekp » Tue Oct 31, 2017 2:11 pm

From https://en.wikipedia.org/wiki/Unified_Emulator_Format on high quality uef files.

MakeUEF

MakeUEF is a Windows application written by Thomas Harte and expanded by Fraser Ross to convert audio samples into UEF files. Two grades are offered. An 'amateur' version reads WAV files or a live signal played to the sound card, and transcribes only standard data blocks with accuracy.[6] The 'professional' grade accepts only CSW files, which represent waves preprocessed into rectangular pulse trains, but it encodes all audio information supported by the UEF specification.

MakeUEF claims to have been the sole creator of all UEF files available on the Web before November 2004, the month of its version 1.0 release.[6] Although the file format was more capable, supporting "gap lengths" since February 2001 at the latest,[8] only "program data" was retained by MakeUEF prior to version 1.0. From November 2004 the fidelity of MakeUEF improved and the file spec was further refined, and an extension of .hq.uef ("high quality") was adopted to reflect this.[6] The AcornPreservation.org archive only carries the HQ.UEF variety as well as the CSW source files. Its sister site StairwayToHell.com accepts 'amateur' UEF translations and files produced by pre-1.0 MakeUEF. As of 2008 the latter site hosts 1,494 transcriptions of BBC Micro cassette titles and at least 800 of Electron titles.

Had a look at your link but I see it only alows for Electron tapes and not BBC uef's.
O can just point it to a bbc file on the site.

User avatar
8bitkick
Posts: 68
Joined: Thu Aug 11, 2016 4:45 pm
Location: California
Contact:

Re: uef2wav.py

Postby 8bitkick » Tue Oct 31, 2017 6:46 pm

vanekp wrote:From https://en.wikipedia.org/wiki/Unified_Emulator_Format on high quality uef files.
Had a look at your link but I see it only alows for Electron tapes and not BBC uef's.
O can just point it to a bbc file on the site.


Interesting. Yes you can. I've linked PlayUEF to the entire STH archive of BBC Micro UEFs, let me know how you get on. (I've not tested this at all on a BBC micro but guess it should work!?

I've found a good description of HQ UEF here. I need to dig into what titles require it but will implement these extra chunks when I have time.

User avatar
vanekp
Posts: 341
Joined: Thu Nov 30, 2000 7:09 am
Location: The Netherlands

Re: uef2wav.py

Postby vanekp » Tue Oct 31, 2017 7:33 pm

I knew there was a write up about hq.uef but could not find it and know most conversion programs like uef2wav.py also does not support it.
Tried a few programs mainly hq.uef's but guess till you have time to look at it and see if you can implement the format your program will not handle the files as it should here is an example of what goes wrong when trying to convert a hq.uef like
https://s3-us-west-1.amazonaws.com/8bitkick/PlayUEF/PlayUEF.html?FILE=https%3A%2F%2Fwww.stairwaytohell.com%2Fbbc%2Farchive%2Ftapeimages%2FSuperior%2FBonecruncher_B.hq.zip
hq.uef.png

Above wave is how it should look but your program chops the leading tone out completely (wave below) and starts immediately with the 1st block.
Peter.

User avatar
8bitkick
Posts: 68
Joined: Thu Aug 11, 2016 4:45 pm
Location: California
Contact:

Re: uef2wav.py

Postby 8bitkick » Tue Oct 31, 2017 7:55 pm

vanekp wrote:I knew there was a write up about hq.uef but could not find it and know most conversion programs like uef2wav.py also does not support it.
Tried a few programs mainly hq.uef's but guess till you have time to look at it and see if you can implement the format your program will not handle the files as it should here is an example of what goes wrong when trying to convert a hq.uef like
https://s3-us-west-1.amazonaws.com/8bitkick/PlayUEF/PlayUEF.html?FILE=https%3A%2F%2Fwww.stairwaytohell.com%2Fbbc%2Farchive%2Ftapeimages%2FSuperior%2FBonecruncher_B.hq.zip
hq.uef.png
Above wave is how it should look but your program chops the leading tone out completely (wave below) and starts immediately with the 1st block.
Peter.


Good example! If you look in the JavaScript console when it loads it warns why (I should made this more visible to user).

PlayUEF is complaining about Bonecruncher having unsupported chunk types (0x116, 0x113, 0x114, 0x111). Today it just supports the basic set like uef2wav. Give me some time and I will implement these.

UPDATE worth noting Acorn Electron (Which PlayUEF was originally developed for) Bonecruncher seems to decode fine, as with every other game I tested! Maybe the BBC archive has more of the HQ variety than the Electron? Either way I will extend to handle HQ

User avatar
vanekp
Posts: 341
Joined: Thu Nov 30, 2000 7:09 am
Location: The Netherlands

Re: uef2wav.py

Postby vanekp » Tue Oct 31, 2017 8:06 pm

okay was not aware of the error message but figured that it was something to do that it did not support the new chunk's and would be hand if it displayed it as you say.
Thanks for your input and feedback look forward to an updated version as and when you get time to look at it.
Peter.

User avatar
8bitkick
Posts: 68
Joined: Thu Aug 11, 2016 4:45 pm
Location: California
Contact:

Re: uef2wav.py

Postby 8bitkick » Tue Oct 31, 2017 8:26 pm

vanekp wrote:okay was not aware of the error message but figured that it was something to do that it did not support the new chunk's and would be hand if it displayed it as you say.
Thanks for your input and feedback look forward to an updated version as and when you get time to look at it.
Peter.


No worries. Could you send me the correct 'reference' wav to test with? I don't have my BBC here to test on right now

User avatar
vanekp
Posts: 341
Joined: Thu Nov 30, 2000 7:09 am
Location: The Netherlands

Re: uef2wav.py

Postby vanekp » Tue Oct 31, 2017 9:45 pm

Here is a wav for bone cruncher.
Attachments
Bone Cruncher.zip
(7.86 MiB) Downloaded 8 times

User avatar
8bitkick
Posts: 68
Joined: Thu Aug 11, 2016 4:45 pm
Location: California
Contact:

Re: uef2wav.py

Postby 8bitkick » Tue Oct 31, 2017 10:35 pm

vanekp wrote:Here is a wav for bone cruncher.


Awesome thanks! I have already updated to warn of unsupported UEFs and will be developing at link below. Will let you know when new chunks are supported.

PlayUEF-HQ

Commie_User
Posts: 916
Joined: Wed Jan 27, 2016 12:50 am

Re: uef2wav.py

Postby Commie_User » Wed Nov 01, 2017 12:41 am

That's great. UEFs even load into my issue 3 board for the first time, where before only real tapes, CSWs and first generation WAV saves worked.

This is a huge expansion for me then, thanks!

User avatar
8bitkick
Posts: 68
Joined: Thu Aug 11, 2016 4:45 pm
Location: California
Contact:

Re: uef2wav.py

Postby 8bitkick » Wed Nov 01, 2017 5:22 am

Commie_User wrote:That's great. UEFs even load into my issue 3 board for the first time, where before only real tapes, CSWs and first generation WAV saves worked.

This is a huge expansion for me then, thanks!


No problem! Let me know what works / what doesn't. In fact, the majority of BBC tapes don't require HQ, and should work for you now :

PlayUEF BBC Micro list

=D>

User avatar
vanekp
Posts: 341
Joined: Thu Nov 30, 2000 7:09 am
Location: The Netherlands

Re: uef2wav.py

Postby vanekp » Wed Nov 01, 2017 5:19 pm

Looks like a very interesting and useful too for playing back uef files, I like how it gives the file name block and load execution address as its playing the data off makes it easy if you need to go back to the start of a block, like when you need to pause the tape for loading programs its easy to get back to the correct point, also that the actual data (printable characters) are displayed it goes and take it highlighted green mean its has reach the end of each block as it switches from dark green to light green.
I was trying to use it to play a local uef by replacing the text after ?file= to ?file=file:///E:\temp\Joust_RUN_B.hq.uef have also tried with a zip file but it does not pick it up, is that possible or does it only work on the web?

With Firefox it works fine but in IE I get this :-
playuef-IE.png


Peter.

Commie_User
Posts: 916
Joined: Wed Jan 27, 2016 12:50 am

Re: uef2wav.py

Postby Commie_User » Wed Nov 01, 2017 5:52 pm

vanekp wrote:
With Firefox it works fine but in IE I get this :-
playuef-IE.png

Peter.


Eh? Internet Explorer...?

Oh I get it, a proper working IE's another April Fool joke again, like when I fell for that BBC Micro 2 thing! :lol:

Won't get fooled again! Trying it once, it even told me my computer was out of date and that Microsoft said I should change it. But I ran Chrome and everything else and the machine was fine.

Commie_User
Posts: 916
Joined: Wed Jan 27, 2016 12:50 am

Re: uef2wav.py

Postby Commie_User » Wed Nov 01, 2017 6:31 pm

8bitkick wrote:
Commie_User wrote:That's great. UEFs even load into my issue 3 board for the first time, where before only real tapes, CSWs and first generation WAV saves worked.

This is a huge expansion for me then, thanks!


No problem! Let me know what works / what doesn't. In fact, the majority of BBC tapes don't require HQ, and should work for you now :

PlayUEF BBC Micro list

=D>


Well I had a random pick of five last night and had problems with none. I suspect I'll be bored before I hit trouble. Play/MakeUEF must have been updated because I think the sound is clearer now than when I tried playing with it. My issue 7 can load anything but it's nice to have an expanded collection for my 3!

User avatar
8bitkick
Posts: 68
Joined: Thu Aug 11, 2016 4:45 pm
Location: California
Contact:

Re: uef2wav.py

Postby 8bitkick » Wed Nov 01, 2017 7:49 pm

Commie_User wrote:
8bitkick wrote:
Commie_User wrote:That's great. UEFs even load into my issue 3 board for the first time, where before only real tapes, CSWs and first generation WAV saves worked.

This is a huge expansion for me then, thanks!


No problem! Let me know what works / what doesn't. In fact, the majority of BBC tapes don't require HQ, and should work for you now :

PlayUEF BBC Micro list

=D>


Well I had a random pick of five last night and had problems with none. I suspect I'll be bored before I hit trouble. Play/MakeUEF must have been updated because I think the sound is clearer now than when I tried playing with it. My issue 7 can load anything but it's nice to have an expanded collection for my 3!


Cool! Glad it helped the issue 3 beeb out with some games :)

PlayUEF does the conversion itself from UEF to WAV in the browser, I am working to improve it a bit plus need to fix for IE (whoops) as I rarely use windows...

User avatar
vanekp
Posts: 341
Joined: Thu Nov 30, 2000 7:09 am
Location: The Netherlands

Re: uef2wav.py

Postby vanekp » Wed Nov 01, 2017 8:08 pm

why does https://s3-us-west-1.amazonaws.com/8bit ... N_B.hq.zip give a "Invalid URI. Load of media resource failed." surely if i point it to a local file it should also work ?

User avatar
8bitkick
Posts: 68
Joined: Thu Aug 11, 2016 4:45 pm
Location: California
Contact:

Re: uef2wav.py

Postby 8bitkick » Wed Nov 01, 2017 8:35 pm

vanekp wrote:why does https://s3-us-west-1.amazonaws.com/8bit ... N_B.hq.zip give a "Invalid URI. Load of media resource failed." surely if i point it to a local file it should also work ?


It's looking for a FILE relative to the server hosting the page, needs a URL to a web resource if not hosted on the server :) Also you would need to encode the URL correctly

I can put a local file loader on the todo list too

User avatar
vanekp
Posts: 341
Joined: Thu Nov 30, 2000 7:09 am
Location: The Netherlands

Re: uef2wav.py

Postby vanekp » Wed Nov 01, 2017 9:19 pm

That would be great and very handy, thanks :D

Commie_User
Posts: 916
Joined: Wed Jan 27, 2016 12:50 am

Re: uef2wav.py

Postby Commie_User » Wed Nov 01, 2017 10:09 pm

8bitkick wrote:
PlayUEF does the conversion itself from UEF to WAV in the browser, I am working to improve it a bit plus need to fix for IE (whoops) as I rarely use windows...


For myself, maybe allow us to open and convert our own UEFs? That would sound good to me, though you've already gone above and beyond for the collection here!

User avatar
8bitkick
Posts: 68
Joined: Thu Aug 11, 2016 4:45 pm
Location: California
Contact:

Re: uef2wav.py

Postby 8bitkick » Thu Nov 02, 2017 1:54 am

Commie_User wrote:
8bitkick wrote:
PlayUEF does the conversion itself from UEF to WAV in the browser, I am working to improve it a bit plus need to fix for IE (whoops) as I rarely use windows...


For myself, maybe allow us to open and convert our own UEFs? That would sound good to me, though you've already gone above and beyond for the collection here!


OK I've implemented basic support for floating point gaps and carrier tones with dummy bytes.

Bonecruncher HQ loads for me now on beeb! (despite not having support for security cycles yet). First time I'd heard the audio intro... nice :twisted: EDIT - but it runs slow... copy protection system? Never played the game before so I don't know if thats expected

Loading local UEF files now also supported https://s3-us-west-1.amazonaws.com/8bitkick/PlayUEF-HQ/PlayUEF.html?LOCAL=true

By clicking the cassette it downloads the WAV

Only tested a bit, but worked ok. Let me know if it works for you.

I have to confess my goal was to get as many games loadable cheaply / easily / quickly rather than achieve accurate WAV conversions... :oops:

User avatar
vanekp
Posts: 341
Joined: Thu Nov 30, 2000 7:09 am
Location: The Netherlands

Re: uef2wav.py

Postby vanekp » Thu Nov 02, 2017 4:43 pm

slow as in load? is a big program so does take some time to load off tape :wink:
Or the game itself is slow playing? its more of a strategy game than anything :wink:
The only reason I wanted to be able to play/load local UEF's is so that I can play/load files I have got off other sites on my BBC.
All seems to work fine so far with testing.

User avatar
8bitkick
Posts: 68
Joined: Thu Aug 11, 2016 4:45 pm
Location: California
Contact:

Re: uef2wav.py

Postby 8bitkick » Thu Nov 02, 2017 4:48 pm

vanekp wrote:slow as in load? is a big program so does take some time to load off tape :wink:
Or the game itself is slow playing? its more of a strategy game than anything :wink:


Slow compared to Repton I suppose...

vanekp wrote:The only reason I wanted to be able to play/load local UEF's is so that I can play/load files I have got off other sites on my BBC.
All seems to work fine so far with testing.


Awesome! That's what I'm aiming for. I made a lot of updates yesterday so getting close to ready I think

User avatar
vanekp
Posts: 341
Joined: Thu Nov 30, 2000 7:09 am
Location: The Netherlands

Re: uef2wav.py

Postby vanekp » Thu Nov 02, 2017 5:57 pm

only ones I am having a problem with are those that switch the parity format in the blocks like for egsample Android Attack https://s3-us-west-1.amazonaws.com/8bitkick/PlayUEF-HQ/PlayUEF.html?FILE=https%3A%2F%2Fwww.stairwaytohell.com%2Fbbc%2Farchive%2Ftapeimages%2FComputerConcepts%2FAndroidAttack_B.hq.zip
and
https://s3-us-west-1.amazonaws.com/8bitkick/PlayUEF-HQ/PlayUEF.html?FILE=https%3A%2F%2Fwww.stairwaytohell.com%2Fbbc%2Farchive%2Ftapeimages%2FAardvark%2FJoust_RUN_B.hq.zip
for example.
But guess (from looking at the console) that its because chunk 104 is not supported as yet:-
0x0104 defined tape format data block at byte 2685

User avatar
vanekp
Posts: 341
Joined: Thu Nov 30, 2000 7:09 am
Location: The Netherlands

Re: uef2wav.py

Postby vanekp » Thu Nov 02, 2017 6:59 pm

fount this page from Thomas Harte http://electrem.emuunlim.com/UEFSpecs.htm may be of use to you 8bitkick.

User avatar
8bitkick
Posts: 68
Joined: Thu Aug 11, 2016 4:45 pm
Location: California
Contact:

Re: uef2wav.py

Postby 8bitkick » Thu Nov 02, 2017 7:12 pm

vanekp wrote:only ones I am having a problem with are those that switch the parity format in the blocks like for egsample Android Attack https://s3-us-west-1.amazonaws.com/8bitkick/PlayUEF-HQ/PlayUEF.html?FILE=https%3A%2F%2Fwww.stairwaytohell.com%2Fbbc%2Farchive%2Ftapeimages%2FComputerConcepts%2FAndroidAttack_B.hq.zip
and
https://s3-us-west-1.amazonaws.com/8bitkick/PlayUEF-HQ/PlayUEF.html?FILE=https%3A%2F%2Fwww.stairwaytohell.com%2Fbbc%2Farchive%2Ftapeimages%2FAardvark%2FJoust_RUN_B.hq.zip
for example.
But guess (from looking at the console) that its because chunk 104 is not supported as yet:-
0x0104 defined tape format data block at byte 2685


Thanks yes 0x0104 next on the list then.... I think this helps with Acorn Atom support too

I've put the whole thing on GitHub now with some proper documentation

https://github.com/8bitkick/PlayUEF

User avatar
vanekp
Posts: 341
Joined: Thu Nov 30, 2000 7:09 am
Location: The Netherlands

Re: uef2wav.py

Postby vanekp » Thu Nov 02, 2017 8:04 pm

was just trying it from my smart phone but could not play (click on play button) it the only option that worked was to download it (click on the tape) and then play it, which always called the file https--www.wav that it downloads and not the name of the uef file or game.

User avatar
8bitkick
Posts: 68
Joined: Thu Aug 11, 2016 4:45 pm
Location: California
Contact:

Re: uef2wav.py

Postby 8bitkick » Thu Nov 02, 2017 8:09 pm

vanekp wrote:was just trying it from my smart phone but could not play (click on play button) it the only option that worked was to download it (click on the tape) and then play it, which always called the file https--www.wav that it downloads and not the name of the uef file or game.


Which phone OS? iPhone works at least... should also be OK on android but not tested on actual device yet.

Commie_User
Posts: 916
Joined: Wed Jan 27, 2016 12:50 am

Re: uef2wav.py

Postby Commie_User » Thu Nov 02, 2017 8:11 pm

8bitkick wrote:I have to confess my goal was to get as many games loadable cheaply / easily / quickly rather than achieve accurate WAV conversions... :oops:


And you did a bang-up job! Or at least it was.....

Something really odd has happened since your update. Nothing loads into my Issue 3 any more. Yesterday, I kept a WAV of the Superior release of 3D Dotty and it still loads no trouble. But trying to load it again from PlayUEF now only gets me 3DDOTTY 00 and no further.

It sounds no tonally different through my speakers. If only I had kept my mouth closed! :)

User avatar
8bitkick
Posts: 68
Joined: Thu Aug 11, 2016 4:45 pm
Location: California
Contact:

Re: uef2wav.py

Postby 8bitkick » Thu Nov 02, 2017 8:16 pm

Commie_User wrote:
8bitkick wrote:I have to confess my goal was to get as many games loadable cheaply / easily / quickly rather than achieve accurate WAV conversions... :oops:


And you did a bang-up job! Or at least it was.....

Something really odd has happened since your update. Nothing loads into my Issue 3 any more. Yesterday, I kept a WAV of the Superior release of 3D Dotty and it still loads no trouble. But trying to load it again from PlayUEF now only gets me 3DDOTTY 00 and no further.

It sounds no tonally different through my speakers. If only I had kept my mouth closed! :)



Ahhh rats. Maybe because I just updated try again (and refresh / clear browser cache) https://s3-us-west-1.amazonaws.com/8bitkick/PlayUEF/PlayUEF.html?FILE=https%3A%2F%2Fwww.stairwaytohell.com%2Fbbc%2Farchive%2Ftapeimages%2FBlueRibbon%2F3DDotty_B.zip

I just loaded it fine on BBC Model B issue 7


Return to “software: other”

Who is online

Users browsing this forum: No registered users and 3 guests