Even though the example bytecount isn't assigned from readBytes(), I've updated the web page to show unsigned int type rather than unsigned char.
I'm curious, was this question also asked on NXP's community forum? ...
Thanks for replies on "what scale to use". For viewing the details of the sound in the higher frequencies the difference is not big. But it might help to stretch the band around the 20kHz. A lot of sound there what...
Paul,
I think you just pointed out the problem. I copied the code from https://www.pjrc.com/teensy/td_serial.html, and didn't notice the bytecount is defined as unsigned char, while the available byte counts can be...
p.s. if anyone else happens to have an Arturia Minilab II and is willing to try the above example code whilst playing notes and sweeping the modwheel slider it would be good to get verification of the problem.
Or if...
I just had a look at the library code. You can simply attach a nullptr to remove the callback.
I.e.:
SpindleEnc.attachCallback(onEncoderChanged); // attaches onEncoderChanged to SpindleEnc...
Richard:
I took another look at my TeensyMIDIPolySynth source & realized that there is one additional difference in my implementation of the USBHost interface that might be pertinent. Because I have only used T4.x...
Thanks for this! I went with this loop in the end, which works for even multiples of the screen height:
static const int SLX = 480;
static const int SLY = 800;
static const int chunks = 4;
static const int chunkSize...
It's coming along nicely, thanks. Just got the preset buttons on the Akai MIDI mapped to the QOSCs, with 8 channels in 8 columns and harmonic waveforms in rows. Now, I can select the image frequencies, plus 2 LFO's, and...
When you try larger reads, is "bytecount" still only an 8 bit number? Storing the result into only 8 bits would explain why you get 0 when you should get 512.
If this doesn't help, maybe you could consider showing a...
Thank you very much for your wonderful explanation of all the possibilities i currently have to read such data, im really new at Teensy and your post is very enlightening, you have no idea how hard was to find a post as...
Ok I think the problem is SerialUSB1.readBytes() itself. I am sending a big chunk of 32K bytes from pc. int handleDataTransfer(){
unsigned char bytecount = 0;
int rd=SerialUSB1.available();
if(...
Thanks Mark,
I very much appreciate any and all suggestions, as I'd really like to have the option of connecting controllers to my synth without a computer. But this is a synth I'd like to make into a product so (for...
Hi,
I would suggest you use an internal framebuffer. Since your screen is monochrome with size 128x64, a memory buffer will only take 128*64 / 8 = 1kb of RAM (at 1 bit per pixel). You may use the GFXCanvas1 class...
Hi KurtE,
Thanks for the reply.
The display can be showing several things as it has 3 pages. One page is just settings for the project so can be ignored. The other two screens show details about the clocks...
Hello Mark
I am sorry. But unfortunately I can't help you much.
Unfortunately, I don't know much about C-classes. I copied the scope code from another open source project.
For display output I use a frame...
I've been using the audio library for some interesting non-audio things. In one of the processes I've written, I've had a need to flush an FFT of all data and start putting new and different data in it. I'd first...
Here is an (untested) snippet of code for drawing a 400x700 viewport centered on a 480x800 screen (in portrait mode) in two passes. First we draw and upload the upper half of the viewport then we do the same with the...
I don't see how it can not be connected unless that etch run has burnt open. You could check that by checking for 5 volts over on pin 1 of Encoder1. (But it would be much better if you check for etch continuity using...
Kurt - works to build fine as x86:
D:\Tim\downloads\Teensy_loader_cli\Debug>Teensy_loader_cli.exe
Filename must be specified
Usage: teensy_loader_cli --mcu=<MCU> <file.hex>
-w : Wait for device to...
Might help if we had a better idea of what is going on and what you would actually like:
That is you say you have 4 clocks running that can update the display? Do they want to update the whole display, or do they...
I now have upgraded to ILI9341_t3n, but I still have Arduino 1.8.13 and Teensyduino 1.53. This must be the reason why it does not work for me.
Thanks for the opaque text output, this is much better!
Until I update...
@Rolfdegen (or anyone else who has already succeeded in adding an oscilloscope display to your TFT project display):
I would like to add an oscilloscope display of the (digital) audio stream created by the Teensy...
Not right now I am building for Debug x86
I am not sure if x64 can build.
If you open properties on project:
Go to linker/Input section
The Additional Dependencies:...
Hi all,
i am working on a project which uses a SSD1306 display connected to a Teensy 3.2. At first i was updating the display whenever something happened which should cause the display to be updated. That didn't...
Didn't restart yet - opened and build gave this:
Severity Code Description Project File Line Suppression State
Error LNK2019 unresolved external symbol __imp_SetupDiGetDeviceInterfaceDetailW referenced in function...
It was asking for some specific 1.45 (?) tool pack. Rather than see if an update would grab it (or it could be found) - the Install of VS2022 Enterprise is done - ready for a reboot
Thehermit... How are you getting on with this project? I'm now able to project ilda files by using laserboy to convert them to wave files first. The results are quite good.
Great, sounds awesomely flexible! I tried with a full 480*800 buffer with all storage in EXTMEM, and "buddha" worked, managing 6.3 FPS :) "mars" also worked (slowly as expected) using fullscreen EXTMEM buffer. Sample...
I just need also 0-5V CV octave/volt from teensy 4.
I used I2c dac and get nice 0-3.3V output then use opamp for amplify it to 0-5V but opamp is not really super solution in this case.
Paul what do you think, if I...
Yes, the 3D renderer is part of the TGX library which is completely independent of the screen/graphic driver used. All the renderer does is to draw graphics in regular RAM and then it is up to you to decide what you...
For the heck of it, I thought I would see if I could make a version of the teensly_loader_cli that builds on windows using visual studio.
For Linux it was easy to build even under windows using the WSL setup, but for...
Logarithmic frequency scales are very common in bio-acoustics as they reflect the hearing capabilities of animals.
However FFT is common in signal processing as it is fast but results in a linear frequency scale....
Hi Eef, I think you are referring to MEL scale.
I think it would become quite hard to determine the species since all batworkers are used to the linear scale (All books and other images I have seen use linear...
Hello everyone,
I would like to show you the project I am working on for more than a year now.
It is called Beatmaker's sketchbook and is an Open Source Sampler & Sequencer, based on a Teensy 4.1.
Check out this...
@vindar - is there an example of configuring your 3D renderer to use just a single non-DMA partial framebuffer? I'm interested to try this on my 800*480 16 bit parallel screen which, given the size and the nature of...
In general, if you go over to https://www.pjrc.com/teensy/td_libs.html, it has all of the pages for documentation about the Teensy libraries.
From there, go to the SPI page,...
It depends on which country or continent you live in/on. Here is an enclosure company based in USA:
https://www.polycase.com/
Lots of options even handheld boxes if you have drill and router to open holes for...
@rvh: Regarding your earlier question on the use/need for calling myUSB.Task(), the USBhost source shows:
/**
* \brief USB main task, responsible for enumeration and clean up stage.
*
* \note Must be...
Use Teensy Loader's auto mode. Once the HEX file is loaded and auto mode is on (which is the default if Arduino caused the hex file to load automatically), then you just plug each Teensy into the USB and press its...
Is anyone using a lockable Teensy 4.1 in production? I am starting to produce my Teensy 4.1 based product and was curious as to what the most optimal workflow is for programming and securing the Teensy. It appears...
#define USE_NATIVE_ETHERNET
#define USE_ILI9341_T3N
//#define USE_ILI9341_T3
#ifdef USE_NATIVE_ETHERNET
// In NativeEthernet.cpp,EthernetClass::begin(...) you must remove waiting on the link status:
/// ...
As I understand it, the usb_midi_flush_output() function is responsible for deleting unread data in the midi buffer.
Since I am constantly querying the Midi buffer in my Polyphonic DIY Synthesizer with MIDI.read()...
And already a question:
When I look at the display and settings of the filter, I see this is measured in kHz and scale is linear (what seems very logical at first sight).
However our ear works in a logaritmical...
Dear members of the forum. Being new here: My name is Eef, and just finished building the detector, with some great help from Edwin.
And compliments for Cor, Edwin and others who contributed here: Great job. (I don't...
i see what you are saying, it is just confusing in the diagram tho, pin 3 hav 3.3V and there is no connection there to the 5V as it seems in the picture. i checked it with a voltage-meter.
Hello all, I am new to the Forum and to the Teensy devices.
I am working on a CAN-ModbusTCP bridge, with a Teensy 4.1 and native PHY Ethernet.
Currently, I have this project working good with an Arduino Mega 2560,...
I have copy-pasted your entire code into a new sketch, uploaded it, and it makes no difference for me:
the output stops after "initializing ILI9341" and when I upload another sketch I have to press the Teensy button....
I have not been able to make the Arturia minilab II work reliably with midi via the USB host port, so it seems the T36 host lib as it stands cannot be used in midi products that would be released to the general public...
Yes, I've connected using the second column (Teensy 3.x Audio Board) because I plan to use the Audio Board. Is that Ok?
So is it easy to "tell the SPI library that the alternate pins are used"?
Sorry if...
I'm sure there are many different enclosures. I typically don't worry about 'fancy' enclosures.
One that I've used in the past is the Altoids tin. You can get a regular Altoids tin (eat the mints in it first), or...
I ran your sketch:
#define USE_NATIVE_ETHERNET
#define USE_ILI9341_T3N
//#define USE_ILI9341_T3
#ifdef USE_NATIVE_ETHERNET
// In NativeEthernet.cpp,EthernetClass::begin(...) you must remove waiting on the link...
Alright, Went back to Native Ethernet and QNEthernet using FTP_Server_Teensy41 latest version and had no problems transferring files back and forth between the client and server using Filezilla and gFTP. All transfers...
As an example of this, you might try looking at the Example: Teensy->USB_SERIAL->USBtoSerial
It shows you how in the loop, it uses the Serial.available() to help determine how many bytes to read.
In addition to this...
Any good boxes/enclosures for the teensy 4.1? I am going to make a little control for lights in my front room and want to put it in the cabinet next to the A/V stuff.
To amplify what PaulS said, on the Teensy 3.x microprocessors, you can choose two sets of pins for the 3 SPI pins:
Pin 11 or pin 7 for DIN/MOSI;
Pin 12 or pin 8 for DOUT/MISO; (and)
Pin 13 or pin 14 for...
I have a motion controller system that works on sending position updates every 20ms. It work great for servos, but the issue I have with steppers is the 50Hz is not synchronous to the stepper output as it is...
That was a big help, thanks! I got it working with t3n, single buffer for now with 50mHz SPI, its getting the same FPS as before without any TGX primitives, (36FPS which is quite acceptable, its just a 2D interface) and...
It's already on your computer because of the installer, and also on github.
https://github.com/PaulStoffregen/cores/blob/7d2e0cd09ba91aa5c7fa0b275c0b546974be11ea/teensy4/usb_serial.c#L183
Look for...
No, I would never change thread pitch while cutting threads with the spindle is turning! My state machine (if I write it correctly) would prevent that from happening. Although it might be interesting to see what such...
My Display has no CS pin. Therefore I cannot connect any other device on this SPI bus together with the display.
There is a MIS pin, which I leave disconnected. This way it works well with ILI9341_t3n.
I can also...
This has exactly the same speed. It can't read too many bytes each time also. Is there source code available? I suspect internally SerialUSB1.readBytes calls SerialUSB1.read() many times in a loop.
int...
Thanks for the input> I am still learning this stuff:) What is the proper way to determine that the transfer is complete? Does the client close the connection?
Are you sure that you want to change the pitch while the spindle rotates? Thinking of the noise the breaking thread tool makes gives me goose bumps :-))
Seriously;
In your controlling application I'd require that...
Is there any way to speed up the Serial.read()? From what I can see on the TESTPin, the while loop run 5 to 6 times each micro seconds. If we can find out how many bytes available, can we use a memcpy to get all the...
@luni, Making some good progress. Have two display screens and a way to get from one to the other. Working on selecting the pitch value and loading the associated values for N and D to the main program.
As I am...
Here's my initial thoughts on the LAN8720A wiring. This mostly duplicates msg #3, but the MDIO pins are moved because conflicting with the primary SPI port is a huge cost for a feature we're probably not ever going to...
After some deep digging in the library I found that it was easier than I could beleive.
This is the shortest code I could produce that simply shows what need to be done to read from (any) port/cable/channel and send...
Sorry! Found it!
Saw that all midi commands could take cable as last argumnt (but default to 0)
Line 1072: void sendNoteOff(uint8_t note, uint8_t velocity, uint8_t channel, uint8_t cable=0) {
Line 1075: void...
There is an interesting post here https://forum.pjrc.com/threads/49753-Problem-with-large-volumes-of-data-on-usbMidi?p=168107&viewfull=1#post168107
It works usb_midi_flush_output() by commenting out into usb.c file...
I see you are confirming that USBHost_t36 can handle devices with several (virtual cables/ports), but by looking at the library I cannot figure out how to send a midi event (NoteOn) to a specific cable on the only MIDI...
I did not realize there is another ethernet library for teensy 4.1, thank you! I will give it a try...
This is cool! Thank you! I already like it better than NativeEthernet, because the sketch can start without...
I am always delighted that there are poeple willing to help in this forum! Thank You!
The code compiles well. And it works well except in the configuration given below:
USE_NATIVE_ETHERNET and USE_ILI9341_T3N, this...
You can add a parameter to designate the port at the end of the midi message
USBHost myusb;
USBHost hub1(myusb);
MIDIDevice MIDI1(myusb);
const byte port1 = 0;
const byte port2 = 1;
const byte myChannel = 0;...
Hi Kris
Thanks for this menu system. Is it possible to have an ItemMenu go to another ItemMenu which goes to another ItemMenu or EditMenu.
right now I am able to get an ItemMenu go to another ItemMenu
Thanks
Many complex factors impact the overall speed.
A couple years ago, quite a lot of work did go into speeding up the Teensy-to-PC code. Less optimization work has (so far) been done on the PC-to-Teensy path, so yes,...