Shop OBEX P1 Docs P2 Docs Learn Events
Singing monk squad — Parallax Forums

Singing monk squad

cgraceycgracey Posts: 14,133
edited 2007-08-08 22:27 in Propeller 1
FOUR MONKS SING 16th CENTURY HYMN INSIDE PROPELLER (in 3.1KB of code)

I've been pretty much holed up for several months working on a vocal tract·object and then a stereo spatializer object. They are both done now. I worked all night to make this demo. Note that·the zip file·contains a new version of the Propeller.exe program which must be used to compile the demo. (The prior·assembler didn't accept RES's as ???_RET label points, but the new one does.)

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔


Chip Gracey
Parallax, Inc.

Post Edited (Chip Gracey (Parallax)) : 10/27/2006 4:04:31 PM GMT
«13

Comments

  • BTXBTX Posts: 674
    edited 2006-10-27 15:39
    Congratulations !, simply impressive !!! Chip.
    Well done. it redeemed your all night work.
    Now you can imagine, we are waiting for the final job <grin>.
    Alberto.

    Envio editado por (BTX) : 10/27/2006 3:49:42 PM GMT
  • Cliff L. BiffleCliff L. Biffle Posts: 206
    edited 2006-10-27 17:50
    Nice work.
    Chip Gracey said...
    The prior assembler didn't accept RES's as ???_RET label points, but the new one does.

    As does propasm. </plug>
  • Cliff L. BiffleCliff L. Biffle Posts: 206
    edited 2006-10-27 17:55
    So, I can't help but notice that your tract model has a number of capabilities that the monks aren't using.

    Any plans for, say, phoneme input? smile.gif
  • Paul BakerPaul Baker Posts: 6,351
    edited 2006-10-27 18:03
    It's a full speech synth, it just needs the phoneme dictionary to be defined.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Paul Baker
    Propeller Applications Engineer

    Parallax, Inc.
  • CJCJ Posts: 470
    edited 2006-10-27 18:17
    any chance of a sample for those of us without audio circuitry hooked to our props?

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Who says you have to have knowledge to use it?

    I've killed a fly with my bare mind.
  • Mike GreenMike Green Posts: 23,101
    edited 2006-10-27 20:07
    Thanks for making this available. Is there a syntax for the new value format (o5Bf)?
  • Mike GreenMike Green Posts: 23,101
    edited 2006-10-27 20:22
    Attached is an MP3 file of the singing monks. You have to download it, then rename it by removing the ".txt" extension so it's just ".mp3". Then it should play with any MP3 player.
  • CJCJ Posts: 470
    edited 2006-10-27 20:51
    WOW!!

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Who says you have to have knowledge to use it?

    I've killed a fly with my bare mind.
  • Paul BakerPaul Baker Posts: 6,351
    edited 2006-10-27 21:16
    Chip, so you didn't have a chorus of monks sing "seven"?

    "Seven" was Chip's test vector for improving the quality of the vocal tract, so our side of the building has been filled with the sounds of "seven" for months now.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Paul Baker
    Propeller Applications Engineer

    Parallax, Inc.
  • cgraceycgracey Posts: 14,133
    edited 2006-10-27 21:39
    Mike Green said...
    Thanks for making this available. Is there a syntax for the new value format (o5Bf)?

    That o5Bf stuff was just something I came up with for the demo so that entering the notes for each part would be simplified. If you read the comments in the code, there are lots of little things which you can tweak. I will make some more examples which focus more individually on the VocalTract and StereoSpatializer.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔


    Chip Gracey
    Parallax, Inc.
  • acantostegaacantostega Posts: 105
    edited 2006-10-27 22:17
    Incredible!
  • Mike GreenMike Green Posts: 23,101
    edited 2006-10-27 22:37
    Chip,
    Yes, I know the note format was just something you came up with, but, if one of us wanted to add a new song, it'd be nice to have the note syntax described rather than having to figure it out. I imagine the capital letter is the note and the number is the octave. What's the "f" and "s"? What else is in there?
    Mike
  • cgraceycgracey Posts: 14,133
    edited 2006-10-28 00:09
    Mike Green said...
    Chip,
    Yes, I know the note format was just something you came up with, but, if one of us wanted to add a new song, it'd be nice to have the note syntax described rather than having to figure it out. I imagine the capital letter is the note and the number is the octave. What's the "f" and "s"? What else is in there?
    Mike
    The "o"·means "octave" and is just a common starting character.
    The·digit is the octave number.
    The "A".."G" is the key.
    The "f" or "s" means flat or sharp. Note o2As is the same as o2Bf.

    Because the VocalTract's gp (glottal pitch) parameter expresses pitch in 1/48ths of·an·octave, it takes an increase of 4 to get to the next note. So, those two bottom bits are always 0, and available for other purposes (as long as they get masked away). In the SingingDemo, I was using them to flag pause-notes and half-notes.

    If you come up with another song, please post it!

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔


    Chip Gracey
    Parallax, Inc.
  • cgraceycgracey Posts: 14,133
    edited 2006-10-28 00:16
    Cliff L. Biffle said...
    So, I can't help but notice that your tract model has a number of capabilities that the monks aren't using.

    Any plans for, say, phoneme input? smile.gif
    Yes, though it probably wouldn't be traditional phonemes, as they are limited in context. A "K" for example is a white noise burst between the prior (or next)·vowel's formant2 and formant3. So, it's more about recipes than canned behaviors. This synthesizer can make very expressive speech, and that needs to be addresses in a high-level driver. Text-to-speech is a way's off, though, as it's mainly a matter of implementing several-hundred formal rules and is not a good fit into the current Propeller. Done off-line, it could be practical. Instead of text-to-speech, we will have something more like a mouth-movement-to-speech protocol. It will take more work to configure, but will be super flexible.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔


    Chip Gracey
    Parallax, Inc.
  • OzStampOzStamp Posts: 377
    edited 2006-10-28 00:50
    Hi To all

    First of all a big thanks to Mike Green for posting this as a MP3 file.

    Awesome stuff Chip thanks.
    Chip Gracey the new Jean Michel Jarre.. http://www.jeanmicheljarre.com/
    Anybody that can remember this guy.. some of his tunes sounded a bit like some of the notes found
    in this short tune Chip has done..
    Now as you get older you will start to enjoy Gregorian Chanting.. now there is an idea for a new record
    using a Propeller as the synthesizer ...( Move over Mr Moog ..)

    I can see text to speech objects arriving soon.. we have the local fire brigade looking for such a product..
    Not playing stored messages .. but messages played thru the intercom at local fire brigade stations that receive
    data (via the Internet) from their local head office.. so the message could be anything at all..

    Cheers

    Ronald Nollet Australia
  • El PaisaEl Paisa Posts: 375
    edited 2006-10-28 01:34
    I am trying to run the singing demo but gives an error at· Vocaltrack line 321 "expected a DAT symbol"

    I am missing something?

    BTW the mp3 version is fantastic.
  • Mike CookMike Cook Posts: 829
    edited 2006-10-28 01:44
    El Paisa,

    Chip's archive included a newer version of Spin.exe, Run that one and then load the demo.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Mike
  • El PaisaEl Paisa Posts: 375
    edited 2006-10-28 01:49
    Mike,

    Where i can get Chip version.

    The one I have is v0.95
  • Mike CookMike Cook Posts: 829
    edited 2006-10-28 01:52
    If you un-zip the SingingDemo.zip it's in the archive, sorry, my bad,·it's not named Spin.exe it's named·Propeller.exe

    attachment.php?attachmentid=43865

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Mike

    Post Edited (Mike Cook) : 10/28/2006 2:04:20 AM GMT
    510 x 104 - 18K
    SC.JPG 17.9K
  • El PaisaEl Paisa Posts: 375
    edited 2006-10-28 02:13
    Mike,

    I upgrade to propeller.exe v1.0 from v0.95.

    Still give me the same error.
  • Mike CookMike Cook Posts: 829
    edited 2006-10-28 02:19
    Lets start again,

    In the *.zip file: SingingDemo.zip that Chip posted at the top of this thread, Chip states:

    Note that the zip file contains a new version of the Propeller.exe program which must be used to compile the demo.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Mike
  • El PaisaEl Paisa Posts: 375
    edited 2006-10-28 02:32
    Thanks.

    I got it, it is v1.02 not v1.0
  • David BDavid B Posts: 591
    edited 2006-10-28 04:19
    This is great! I just played it on my homemade propeller board.

    I used to use an SPO256 speech chip, which also made speech by tacking together primitive sounds, but was surprisingly understandable and fun to listen to.

    I hope this'll get the propeller speaking pretty soon.

    David
  • cgraceycgracey Posts: 14,133
    edited 2006-10-28 06:54
    Paul Baker (Parallax) said...
    Chip, so you didn't have a chorus of monks sing "seven"?

    "Seven" was Chip's test vector for improving the quality of the vocal tract, so our side of the building has been filled with the sounds of "seven" for months now.

    Okay, you asked for it...· "Seven" like you've never heard it!

    Because the timing got hosed up due to the increase in frames per tract per note, it wound up playing the four parts, basso to soprano, in sequence for every note period. Now it sounds like Pachelbel's Canon:

    ··········· Seven
    ······· Seven
    ··· Seven········ ··· Seven...
    Seven············ Seven
    ················ Seven
    ·

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔


    Chip Gracey
    Parallax, Inc.

    Post Edited (Chip Gracey (Parallax)) : 10/28/2006 9:00:23 AM GMT
  • kelvin jameskelvin james Posts: 531
    edited 2006-10-28 07:27
    Chip, you don't receive the reconognition you deserve. This is a lot of fun to play with. Is there some some type of data values you have worked out for the vowels? And, is there some way of adjusting the " attack " ? I have found adjusting a few settings has given a more natural sound, mostly echo. I will be posting a new song shortly.

    kelvin
  • cgraceycgracey Posts: 14,133
    edited 2006-10-28 08:44
    kelvin james said...
    Chip, you don't receive the reconognition you deserve. This is a lot of fun to play with. Is there some some type of data values you have worked out for the vowels? And, is there some way of adjusting the " attack " ? I have found adjusting a few settings has given a more natural sound, mostly echo. I will be posting a new song shortly.

    kelvin
    Man, I'm glad you're having fun with it! To make·a speech·synthesizer has been a dream for me since 1993. At that point, I worked on it for 1.5 years, but abandoned the project to get onto the BASIC Stamp II. With time and experience, I realized I didn't want to invest the requisite efforts again·until we had our own capable chip to base it on.

    A·year and a half·ago, I found a site that documented a speech synthesizer product called "Computalker" from 1978, which was made by a small company in southern California. It goes into depth about what you have to do, once you have a synthesizer, to make speech sounds. Back then, that synthesizer was necessarily largely analog, but these days, digital silicon has enough horsepower to realize it all in software. Here is the site's url from the Netherlands:

    http://web.inter.nl.net/hcc/davies/esp7cpt.html

    Study that page. It's all there. This was instrumental in helping me to understand just how finite a synthesizer can be. It was this site and this old product that gave me the "you can do·it" impetus to get back on the horse. While that synthesizer might seem primitive, when those concepts are·implemented·in a modern processor, you can realize a huge boost in quality and periphery functions. Like many important ideas, the technical essence was distilled long ago, and reality still hasn't changed. The Computalker guys knew exactly what to do, but they were hamstrung by the limited implementation possibilities of their day.

    What seems to be revered as THE standard these days is the Klatt synthesizer algorithm, and it's variants. Even this thing was finalized in the early 1980s. You can Google Klatt and find all sorts of stuff, but it's not necessary. Learn about the computalker and experiment with the VocalTract. Be sure to read the doc comments within the VocalTract.

    I would recommend pulling the StereoSpatializer out of your code for now, if you want to gain core knowledge about synthesis, using the VocalTract as a platform. The VocalTract can output to the pins directly, just like the spatializer is doing. This way, it's simpler and you'll get an unadulterated version of the audio. The VocalTract shows the 13 byte variables that need to exist in your object. It's easy to get going with the VocalTract directly - a degree simpler than the SingingDemo suggests.

    Those formant values can be found on the web, too, by searching for 'vowel formants'.

    I made one tool which I've used to "see" what I need to synthesize (formants, and all):

    http://forums.parallax.com/showthread.php?p=581578

    This program will let you make recordings from your PC microphone and view the resulting audio spectrum in three dimensions: time, frequency, and energy. To see your own voice formants, it helps to make your glottal frequency as low possible by creaking·your voice·and slowly reshaping your mouth to make different vowels. This will tightly space the pitch lines so that the centers of the formants become more prominent. Then, you can point with the mouse and read the center frequency. It's fun!

    So many wonderful insights can be made into the nature of speech, sound, and physics by playing around with something like this. I've·had this bug bad·for years.

    Please do share whatever you come up with, and help others experience the fun of it. Your perceptions of what sounds "right" could easily be way better than mine. That's one of the richnesses of speech synthesis - unlike serial output that either works within spec or not, speech is a perpetual continuum.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔


    Chip Gracey
    Parallax, Inc.

    Post Edited (Chip Gracey (Parallax)) : 10/28/2006 5:42:49 PM GMT
  • Paul BakerPaul Baker Posts: 6,351
    edited 2006-10-28 09:32
    Ah, thats more like it.

    omit the .txt extension to play.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Paul Baker
    Propeller Applications Engineer

    Parallax, Inc.
  • Bill HenningBill Henning Posts: 6,445
    edited 2006-10-29 03:17
    Very cool!
  • HarleyHarley Posts: 997
    edited 2006-10-29 04:37
    Enjoyed the quartet.

    But, is there some speech for .mp3? Like a number of tough words, to compare with 'compooter', for example.

    To think that one IC can do 4 voices is very intreguing (sp?) yeah.gif

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Harley Shanko
    h.a.s. designn
  • ForrestForrest Posts: 1,341
    edited 2006-10-29 04:41
    Wow - my perception of 7 has been altered forever tongue.gif
Sign In or Register to comment.