Lightweight and portable, with built-in speakers and a headphone output.Suitable for a beginner, with pro-level sound quality from Casio's AiX sound source.In addition, a 1/4" headphone output and a 1/8" input are provided. Other features include a metronome, an arpeggiator, a transpose function, octave shift, 17 pre-set scale settings, and a six-track MIDI recorder. It can be used with batteries (not included) or the included AC adapter by casual or beginning players who need a portable instrument with a natural sound.įeaturing digital effects including reverb, chorus, delay, and EQ, the CT-X700 is built with 310 music presets, 160 built-in songs, and a lesson system for teaching. Finally published my audio app today, this turned out to be be a long and painful road.The CT-X700 61-Key Portable Keyboard from Casio features 61 piano-style keys with touch-response, an AiX tone generator with 48-note polyphony and is equipped with 600 tones and 195 rhythms. I leaned a lot about Android audio, but the app took so long it was no longer fun. In the end I published a scale down app just so I could hold my head up and not have to declare failure. ![]() I'm still polishing my skills and entertaining myself, so I'm developing simple Android apps in preparation for some killer app ideas down the road. I need to master playing mathematically generated audio files.įirst I decided to expand the audio tone generator functions in my starter app to make a publishable signal generator and audio test app. I thought this would go well with my hobby electronics bent. The flashlight strobe app had the issue that many phones use different hardware, and I got a lot of complaints that it didn't work on certain phones. This app sticks to commonly compatible hardware. I'm making a point not to search for apps like the one I want to develop. That is way too depressing because everything imaginable has already been written. The way to learn is to do, so I'm making apps that I feel would be useful. It is much more exciting to maintain the illusion of being creative. Plus I don't want to be accused of copying anything. I'll use the background thread asynctask function from the light blinker app to generate the tone. The previous app just made a tone for a short duration and locked up the UI while it did so. I want to be able to make a continuous tone, and modulate it with the slider bar and have it running in a background thread. One big help is that suddenly the tone generator works in the emulator. Previously I could play tones from my phone, but the emulator was mute. My PC has been rebooted and maybe the soundcard was just out to lunch. But it works now, I can hear the tones from the PC. SampleRate, AudioFormat.CHANNEL_CONFIGURATION_MONO,ĪudioFormat.ENCODING_PCM_16BIT, numSamples,ĪudioTrack.write(generatedSnd, 0, generatedSnd.length) I started with these functions to generate a toneįinal AudioTrack audioTrack = new AudioTrack(AudioManager.STREAM_MUSIC, It does seem that the loading in the emulator leads to more interruptions in the sound playback than on a real device. In order to make the tone continuous, and not a series of chopped tones, I need to use STREAM not STATIC mode. Need to write continuously to the audio track, turns out the buffer is blocking so you just keep writing. This mod made a nice continuous tone:Īwesome, I have the soul of the app. I copied over my light blinking app and pasted this function into the Asynctask, and it worked great. That variable is controlled by the GUI and breaks the loop when the user pushes the button. The tone turns on and off with the toggle switch and the background thread is working great, the UI doesn't lock up. With a few minutes hacking I replaced the light blinking with the tone generation in my previous app. Now the radio buttons play different tones and the slider sets the tone frequency. Just proof of concept, the buttons all say the wrong thing, etc. The second half of the proof of concept that the slider bar can control the tone while it plays. ![]() What will actually happen is the slider bar will change the variables for tone gen function that will calculate the data, and then that will get queued into the audio playback. Hopefully the lag won't be so great the user gets annoyed. I put a new tone generation step in the loop.
0 Comments
Leave a Reply. |