Author Topic: QB64 TankDrum - Playable/Recordable Virtual Instrument  (Read 6268 times)

0 Members and 1 Guest are viewing this topic.

Offline Dav

  • Forum Resident
  • Posts: 792
    • View Profile
QB64 TankDrum - Playable/Recordable Virtual Instrument
« on: October 13, 2020, 11:24:16 am »
This is a little TankDrum instrument you can play and record little tunes with.  It's easy to use, just click on the drum notes to play them.  Hit R to record your playing in real-time.  Hit P to play back your song. Hit C to clear it and start over.  Your song can be saved to file and loaded again later.  This was quickly thrown together, which is obvious in the code, I just wanted to get something working fast.  I hope to improve this program soon, maybe use a more interesting scale, or perhaps allow selecting different scales.  Enjoy.

- Dav

New in version 1.0c: Increased number of notes to 15, changed to a major scale, Can undo last recording process, can save/load/delete song.

Download TankDrum v1.0c Source (674k) --> 

 
tankdrum.png


« Last Edit: October 16, 2020, 01:03:46 pm by Dav »

Offline bplus

  • Global Moderator
  • Forum Resident
  • Posts: 8053
  • b = b + ...
    • View Profile
Re: QB64 TankDrum - Playable/Recordable Virtual Instrument
« Reply #1 on: October 13, 2020, 01:11:21 pm »
Damned if that doesn't look like a fancy smoke detector mounted on an acoustic ceiling tile :)

Well this looks like fun! Thanks Dav

Offline bplus

  • Global Moderator
  • Forum Resident
  • Posts: 8053
  • b = b + ...
    • View Profile
Re: QB64 TankDrum - Playable/Recordable Virtual Instrument
« Reply #2 on: October 13, 2020, 01:58:22 pm »
Dang ogg files! Went to run the bas file and Windows Explorer hung up "loading directory"
 
dam ogg files!.PNG


This line is not working:
Code: QB64: [Select]
  1. $EXEICON:'tankdrum\tankdrum.ico'
  2.  

Tried the typical fix of prefixing .\ but still not found. I am not going to see if double tankdrum\tandkdrum\tankdrum.ico from extract with Windows Explorer crashed computer one time already.

Really recommend putting ogg files in their own subdirectory so Windows users can access the bas or image files without hassles with Windows Explorer.

Anyway after restart after crash and some other trick to get the bas file loaded into QB64 before Explorer hangs everything up, after all that the sounds are really nice for musical instrument.

Offline Dav

  • Forum Resident
  • Posts: 792
    • View Profile
Re: QB64 TankDrum - Playable/Recordable Virtual Instrument
« Reply #3 on: October 13, 2020, 02:11:27 pm »
Wow...I didn't know (or forgot) about the ogg file problem.  Putting them in a "tankdrum\ogg\" will fix that  (And \tankdrum\img\ for images)?  Also, I can leave out the .ico file if it's a problem with some windows versions.  I sure didn't have any of those problems here using my lower windows version Win7, which is so out of date everyone tells me, is inferior to win10, and no longer even supported by M$ at all, but still works smoothly most all of the time (I'm only being sarcastic to Microsoft by the way, not you).

I really appreciate you going through the trouble bplus, and trying it out.  I'll make the changes and put up another download as soon as I can.  Thanks!

- Dav
« Last Edit: October 13, 2020, 02:16:24 pm by Dav »

Offline bplus

  • Global Moderator
  • Forum Resident
  • Posts: 8053
  • b = b + ...
    • View Profile
Re: QB64 TankDrum - Playable/Recordable Virtual Instrument
« Reply #4 on: October 13, 2020, 03:48:03 pm »
Hi @Dav

It's just the ogg files that cause problems.

I liked Windows 7 the best and in my old man's opinion that includes the world going to hell in a hand-basket, Windows 7 was the Best! (Never used XP with QB64 and barely used it with VB6 before I switched everything to .NET and realized FT! and then there was a loss of a computer and...  OTOH Steve makes a good case about getting stuck in the past, fuddy-duddy sort :) So don't think you are missing anything really valuable by not having 10 IMHO I am kind of envious :)

Anyway, the problem with loading ICO image I think is because when I extract with Windows 10 (the easy way) I get double folders of the extracted folder name twice. I am guessing that is what happened and why the usual fix didn't. I know it should be easy fix no matter what, I just am not going to use Explorer again to get to the base of the problem. Wait... I have my own Explorer now! thanks to QB64, I can work around and check.

Hey did you get that image from a smoke detector?
« Last Edit: October 13, 2020, 03:52:11 pm by bplus »

Offline Dav

  • Forum Resident
  • Posts: 792
    • View Profile
Re: QB64 TankDrum - Playable/Recordable Virtual Instrument
« Reply #5 on: October 13, 2020, 09:48:25 pm »
Lol @ smoke detector. Nope, it was a metal steel pan pic I heavily manipulated in my image tools and added some color gradients, texture and a background.  I was going for a different look, and had a others versions, but got tired of messing with it so I went with the blue one. I copied the note layout from other tankdrums I have seen.

 - Dav

Offline bplus

  • Global Moderator
  • Forum Resident
  • Posts: 8053
  • b = b + ...
    • View Profile
Re: QB64 TankDrum - Playable/Recordable Virtual Instrument
« Reply #6 on: October 13, 2020, 10:04:22 pm »
Time for a Google, tankdrums, oh yeah! now I see, never saw that before.

Offline Richard Frost

  • Seasoned Forum Regular
  • Posts: 316
  • Needle nardle noo. - Peter Sellers
    • View Profile
Re: QB64 TankDrum - Playable/Recordable Virtual Instrument
« Reply #7 on: October 13, 2020, 10:22:13 pm »
I thought it was a Frizbee.

Handpans sound like this:


Looks like a fine way to abuse finger joints.

I'd try your program but I have the musical talent of a dead frog.
However, I did study the code to learn from it.  Are you allergic
to arrays?



« Last Edit: October 13, 2020, 10:24:50 pm by Richard Frost »
It works better if you plug it in.

Offline Dav

  • Forum Resident
  • Posts: 792
    • View Profile
Re: QB64 TankDrum - Playable/Recordable Virtual Instrument
« Reply #8 on: October 13, 2020, 10:40:25 pm »
I've watched that video before.  Hang drums like those sound cool. A good one cost thousands, so I'll probably never have one.  I have had a tank drum made from a propane tank that cost a couple hundred, it did hurt the fingers pretty much and didn't sound near as good as the hand pans.  Ended up giving the drum away to a friend who really adored it.

- Dav

Offline SpriggsySpriggs

  • Forum Resident
  • Posts: 1145
  • Larger than life
    • View Profile
    • GitHub
Re: QB64 TankDrum - Playable/Recordable Virtual Instrument
« Reply #9 on: October 14, 2020, 12:39:35 pm »
I'll give this a try later today. Looks cool
Shuwatch!

FellippeHeitor

  • Guest
Re: QB64 TankDrum - Playable/Recordable Virtual Instrument
« Reply #10 on: October 14, 2020, 12:49:56 pm »
Looks really cool, indeed! I'll be trying it out soon too!

Offline bplus

  • Global Moderator
  • Forum Resident
  • Posts: 8053
  • b = b + ...
    • View Profile
Re: QB64 TankDrum - Playable/Recordable Virtual Instrument
« Reply #11 on: October 14, 2020, 01:18:39 pm »
Quote
I'd try your program but I have the musical talent of a dead frog.Are you allergic
to arrays?

Maybe it's a matter of finding the right instrument? I am betting this one will be fun to tinker with and that I believe is all it takes.

Despite my complaints of ogg files (and that is a Windows 10 problem) this one sounds really cool!

I haven't looked at the code but I doubt Dav is allergic to arrays, guess I will have to see WTH that's about?

Offline Dav

  • Forum Resident
  • Posts: 792
    • View Profile
Re: QB64 TankDrum - Playable/Recordable Virtual Instrument
« Reply #12 on: October 14, 2020, 07:20:45 pm »
Nah, I'm not allergic to arrays.  I guess it depends what coding mood I'm in at the time.  Sometimes I code quick and messy, other times neat and tidy. The more time spent on a program though I usually get it in better shape. You should see some of my first draft programs - looks like a beginner made them.

- Dav

Offline bplus

  • Global Moderator
  • Forum Resident
  • Posts: 8053
  • b = b + ...
    • View Profile
Re: QB64 TankDrum - Playable/Recordable Virtual Instrument
« Reply #13 on: October 14, 2020, 07:25:17 pm »
You know I went to look at it again for the array usage and crashed my computer

again,

Man I thought you updated the zip and put the oggs in a separate folder, dang!

The post even says you had edited it.

Offline Dav

  • Forum Resident
  • Posts: 792
    • View Profile
Re: QB64 TankDrum - Playable/Recordable Virtual Instrument
« Reply #14 on: October 14, 2020, 07:33:44 pm »
I'm sorry.  No I haven't updated it yet.  I forgot to take my laptop with me today. Hanging out at my fathers home now this evening. I probably won't get to update the zip until tomorrow.

- Dav