Linwood
Posts: 32
Joined: Sat Jun 28, 2014 2:08 am
Location: Cape Coral, Florida

Music Touch Display, Calibre Integrated, Piano (MusicalPi)

Wed Dec 28, 2016 7:21 pm

I got tired of paper sheet music falling off my piano, and decided I also needed a new Pi project, so her goes.

I called it MusicalPi.

The result is a two page touch screen on the piano that looks like this:

Image

The Pi sits under the piano, but could be behind the touch screen:

Image

The touch screen is a Dell S2240T 21.5" touch screen, so the resulting music image is about the same size as sheet music. The music is stored in Calibre, an open source widely used eBook library, but one that happily will store PDF's.

It can be controlled by touching the right or left of the screen, or by a pedal, e.g. like this PageFlip:

Image

The software is written in QT, with the basic widgets software not Quick or QML, and works with the distro available for QT 5.5 for the Mate Pi distribution, so no need to build QT yourself, or even cross compile, unless you want to.

The most expensive part is the touch screen. In theory this could run on a tablet (since QT is so portable), and is set up to permit 1-up display as well (with half-page turns) but was really intended for a large display suitable for a piano, much as a book of music would look.

The software is available github here: https://github.com/Linwood-F/MusicalPi

Installation and setup instructions are there in the wiki. Please enter issues (bugs, etc.) there if possible, though I will check back here occasionally.

Discussion on how this came to be, alternatives I considered, etc., are here: https://www.leferguson.com/musicalpi-pi ... irst-look/

stevend
Posts: 211
Joined: Fri Oct 11, 2013 12:28 pm

Re: Music Touch Display, Calibre Integrated, Piano (MusicalP

Sun Jan 22, 2017 7:38 pm

Interesting project - and some nice twists on how to display the page changes.

I've had a go at building this on both Raspbian and Mate, and thought I'd fill in that bit which says "SOMETHING NEEDED HERE - IT DID NOT MAKE THE FIRST VERISON -- REDO NEEDED" in the documentation:

Code: Select all

1. Install ssh [Mate only]
	sudo apt-get install ssh

7. Install calibre DB if running it locally
	sudo apt-get install calibre

8. Reboot (primarily to start SSH) [Mate only]

9. Install git [Mate only]

10. Install qt5:
	sudo apt-get install qt5-default qtcreator

11. Install poppler library (May not need them all!):
	sudo apt-get install libpoppler-cpp-dev libpoppler-cpp0 libpoppler-glib8
	sudo apt-get install libpoppler-qt5-1 libpoppler-qt5-dev

12. Install midi player package:
	sudo apt-get install tse3play libtse3-0.3.1c2a libtse3-dev
I found that the very latest software, which has midi-related additions, wouldn't compile on either Raspbian or Mate. Raspbian has QT5.3, which may account for it (the program was built with QT 5.5). Under Mate, it seems to be related to a couple of undefined calls to TSE3::MidiFileImport::MidiFileImport(). I downloaded the code as at 28th December 2016, and that compiled fine under Mate.

On with the next stage!

Linwood
Posts: 32
Joined: Sat Jun 28, 2014 2:08 am
Location: Cape Coral, Florida

Re: Music Touch Display, Calibre Integrated, Piano (MusicalP

Sun Jan 22, 2017 7:49 pm

My apologies, once I started adding the Midi stuff, it probably started breaking. I actually fixed (I hope) the "something needed here" an hour or few after I posted that note -- I had somehow omitted it from my cutting and pasting. Sorry about that.

I need to make a separate branch or version or something so my work doesn't break things. I'm using Git to actually copy between systems, just because it's really easy, but clearly that is pushing stuff over.

The Midi stuff by the way is using the TSE3 libraries, which I had to compile separately. I'll post those details when I get it to run. It does compile on the Pi on Ubuntu Mate; my guess (emphasis on guess) is that the lack of mention of the TSE3 stuff may be the reason for the lack of compilation, and maybe some things it needed.

I'm off on a tangent now, going to try a different way to do Midi. I'm not real happy with what I've done so far there, as it is hard for the user to follow what measure they are on (the TSE3 library lets me track measures but does not do it in sync with the scheduler clock, so especially if you adjust the time scale, the measure count I am showing is WAY behind the actual measure being played. I have found no way to adjust that -- I've tried both the transport and scheduler clock sections without luck.

The tangent I'm on is to look at something like Musescore and see if it is practical to strip out just it's notation and midi play portion (the midi is really Jack underneath the cover talking to ALSA), and see if the Pi can keep up with displaying it. That would give an interactive notation display one could use when replaying (and while I'm at it am looking into using a synthesizer when people lack a real Midi piano), but that required later versions of everything, so I'm in the middle of making sure I can build the latest QT on Pi. Just got that going last evening, so now off to see if I can build Musescore and get it functioning un-hacked, then going to start seeing if I can extract portions.

Thanks for the interest. Sorry about screwing up Github; I'll try to get that reconciled and back to a working version and put some kind of branch or version label or whatever they use to only have the default be working code.

stevend
Posts: 211
Joined: Fri Oct 11, 2013 12:28 pm

Re: Music Touch Display, Calibre Integrated, Piano (MusicalP

Sun Jan 22, 2017 8:50 pm

Thanks for the quick reply.
The "SOMETHING NEEDED HERE" bit was where I assumed the necessary libraries for download were intended to be mentioned - couldn't see the information elsewhere.
The tse3 library was available in both the Raspbian and Ubuntu repositories. I did also download the original and try to install from source; it didn't work 'out of the box' and I didn't pursue it. I suspect the problem is related to a type declaration or cast; the complete error message was:

Code: Select all

tse3play.o: In function `tse3play::go()':
tse3play.cpp:(.text+0x1b4): undefined reference to `TSE3::MidiFileImport::MidiFileImport(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, int, std::ostream&)'
midiplayer.o: In function `midiPlayer::openAndLoadFile()':
midiplayer.cpp:(.text+0x1e6a): undefined reference to `TSE3::MidiFileImport::MidiFileImport(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, int, std::ostream&)'
collect2: error: ld returned 1 exit status
Makefile:204: recipe for target 'MusicalPi' failed

Linwood
Posts: 32
Joined: Sat Jun 28, 2014 2:08 am
Location: Cape Coral, Florida

Re: Music Touch Display, Calibre Integrated, Piano (MusicalP

Sun Jan 22, 2017 9:06 pm

Yeah, the TSE3 library in the Distro is somehow broken. I had the same issue, and had to build it from source to get it to work correctly.

It's actually a bit of a pain, as it won't build from the old source, partly due to C language changes, but partly due to just bad code. The Ubuntu distro source for the package build will work however.

Here's roughly what I did to get it to work from source. You might need more than asound2. Deinstall the distro version first. Make sure the patches apply cleanly, and the configure run doesn't give warnings if needed libraries are not there (notably ALSA) it just disables support. It does say "yes" or "no" but doesn't fail, I should say. Note I installed to the normal distro location not /local which may be a bit unusual but I wanted the paths to all match up.

TSE3 is a bit fragile, I think, since it dates from about 2002.

Code: Select all

sudo apt-get install libasound2-dev

cd ~
wget https://launchpad.net/ubuntu/+archive/primary/+files/tse3_0.3.1.orig.tar.gz 
wget https://launchpad.net/ubuntu/+archive/primary/+files/tse3_0.3.1-4.3ubuntu1.diff.gz
gunzip tse3_0.3.1-4.3ubuntu1.diff.gz
tar -xzf tse3_0.3.1.orig.tar.gz
mv tse3-0.3.1 tse3-0.3.1.orig
patch  -u -p0 --verbose -i tse3_0.3.1-4.3ubuntu1.diff
cd tse3-0.3.1.orig
./configure --with-alsa --enable-static --enable-shared --prefix=/usr
## Make sure in the above that it shows alsa wanted and present in the output
make
sudo make install 

As far as I know the version now checked in will build and play MIDI (not synthesizer, just plain midi output if you have a USB Midi cable plugged into the pi going to a keyboard as output. To get it to play put BOTH the .pdf and .mid file in the SAME calibre book. It will notice that both are there, and add a button to the play display for play-midi.

It more or less works with the time and volume scale (at least for me), just not the measure count display. Also, for me, and maybe it is my piano, it misses the first couple of notes. It does that in the utility tse3play as well, so I have not tried trouble shooting that yet.

PjJns
Posts: 6
Joined: Sun Apr 26, 2015 12:38 am

Re: Music Touch Display, Calibre Integrated, Piano (MusicalP

Thu Jan 26, 2017 4:49 pm

Awesome! Glad I found your post. Yea I got tired of sheets falling everywhere too! I took a screen out of a dead lap top and hooked it up to RasPi to scroll and manipulate sheet music on screen. But only works keyboard and mouse, need it to be multi-touch. Having trouble finding an overlay screen to accomplish this. I will be following your project and if you could send pointers will be much appreciated.

Linwood
Posts: 32
Joined: Sat Jun 28, 2014 2:08 am
Location: Cape Coral, Florida

Re: Music Touch Display, Calibre Integrated, Piano (MusicalP

Thu Jan 26, 2017 5:09 pm

Glad it may be of interest. The Touch Screen for me was an absolute necessity. While page turns I could do with a foot pedal, searching for a piece of music is really not viable with just a pedal. I thought about controlling the library from (say) a phone or other external device, but that was just too kludgy. The touch screen costs about 8 times the price of the Pi, but was really needed.

I'm still off on a tangent trying to get a display-as-it-plays midi player going, but I think the basic display works fine with the caveat you need to disable the midiplayer widget and calls, or need to build tse3 as above to get it to link.

stevend
Posts: 211
Joined: Fri Oct 11, 2013 12:28 pm

Re: Music Touch Display, Calibre Integrated, Piano (MusicalP

Fri Jan 27, 2017 11:10 pm

Linwood wrote: Here's roughly what I did to get it to work from source. You might need more than asound2. Deinstall the distro version first. Make sure the patches apply cleanly, and the configure run doesn't give warnings if needed libraries are not there (notably ALSA) it just disables support. It does say "yes" or "no" but doesn't fail, I should say. Note I installed to the normal distro location not /local which may be a bit unusual but I wanted the paths to all match up.
Thanks for this information, I've used your commands (with a couple of tweaks) and all compiles OK, and at least runs.
There were quite a lot of warnings when compiling the library - presumably a reflection of the vintage code.
All of the last three steps need 'sudo':

Code: Select all

sudo ./configure --with-alsa --enable-static --enable-shared --prefix=/usr 
sudo make
sudo make install
Now to set up calibre....

Linwood
Posts: 32
Joined: Sat Jun 28, 2014 2:08 am
Location: Cape Coral, Florida

Re: Music Touch Display, Calibre Integrated, Piano (MusicalP

Sat Jan 28, 2017 5:48 pm

The first two shouldn't require a sudo; the configure and make should occur in the file created from the download. If it's not because of some kind of file ownership, it is cleaner to fix those first. The make install certainly does need it, thanks.

stevend
Posts: 211
Joined: Fri Oct 11, 2013 12:28 pm

Re: Music Touch Display, Calibre Integrated, Piano (MusicalP

Sun Jan 29, 2017 5:37 pm

Linwood wrote:The first two shouldn't require a sudo; the configure and make should occur in the file created from the download. If it's not because of some kind of file ownership, it is cleaner to fix those first. The make install certainly does need it, thanks.
I suspect the problem is with the configure - it then creates some files with root as owner.

Initially it would crash when I selected a file to display; I traced it to the fact that the program was looking for a file with a '.PDF' extension, and all my files were stored with lower case.
Couldn't find where the upper case extension was set/forced (somewhere in the database triggers?), so added a bit of error checking and forcing of my own into pdfdocument.cpp at around line 35:

Code: Select all

    if(filepath.endsWith(".pdf",Qt::CaseInsensitive))
    {
		if (!QFile(filepath).exists())
		{		// For now, assume extension was in capitals, and try lower case
			filepath.replace(filepath.length() - 4,4,".pdf");
			if (!QFile(filepath).exists())
			{
				// Real problem here - file doesn't exist at all
				qDebug() << "Can't find file " << filepath;
				return;				// TODO: We should pop up a message here
			}
		}
        midiFilePath = filepath;
        midiFilePath.replace(filepath.length() - 4,4,".mid");  // tentative path
        QFileInfo check_file(midiFilePath);
        if(!check_file.exists() || !check_file.isFile()) midiFilePath = ""; // if not there, just blank it out to tell others
    }
    else midiFilePath = "";

Linwood
Posts: 32
Joined: Sat Jun 28, 2014 2:08 am
Location: Cape Coral, Florida

Re: Music Touch Display, Calibre Integrated, Piano (MusicalP

Sun Jan 29, 2017 5:45 pm

Root: I'll look, I don't recall that. I have been trying hard to use it only as required.

PDF: Thanks, I'll take care of it, and appreciate the input.

There's actually quite a bit more I want to do at the calibre interface, including eventually writing back. I had been thinking of building "play lists" in as additional tags, so different users of the program could tag pieces they are practicing, or going to play together, and call them up quickly. I've just gotten hopelessly lost in this whole "how to display music as it is played by the player system" issue. I'm enamored with what MuseScore does, but not sure how to get it both integrated with, and working fast enough. I tried a couple of javascript players, but they couldn't even keep up playing much less how long they took to get a browser to appear.

Starting to wonder if the new ASUS board isn't a better option (though not available I think -- but twice the speed and memory).

stevend
Posts: 211
Joined: Fri Oct 11, 2013 12:28 pm

Re: Music Touch Display, Calibre Integrated, Piano (MusicalP

Sun Jan 29, 2017 8:15 pm

Linwood wrote:Root: I'll look, I don't recall that. I have been trying hard to use it only as required.
There was certainly some sort of error during config which was fixed by using root level access. And I started this with a clean Ubuntu install - albeit possible side effects from sorting out the tse3 library.
Linwood wrote: I had been thinking of building "play lists" in as additional tags, so different users of the program could tag pieces they are practicing, or going to play together, and call them up quickly.
Excellent idea - makes it much easier to run through a list of pieces. And (with 2-page display) hopefully 'append' the next pdf, such that if the first file has an odd number of pages, the first page of the next pdf immediately follows on the right. (Just an offset which is 1 or 0 for the page?)

Speed-wise, initial impression is that the Pi is fast enough, with the music database actually on the SD card. But I haven't used it in anger yet (got to get busy scanning)

stevend
Posts: 211
Joined: Fri Oct 11, 2013 12:28 pm

Re: Music Touch Display, Calibre Integrated, Piano (MusicalP

Sun Feb 05, 2017 5:23 pm

I've now used this for real, and generally works well - I've got to get the position of the pedal right, since I kept on pressing it twice (or more) instead of once - maybe a dead time after each press would solve that.

Calibre also works fast enough on the Pi to be usable as the primary data input.

I found I wasn't always sure whan I'd reached the last page, so I've modified the code to put a green line across the bottom of the last page.

I'm using the Pi with a mouse (rather than touch screen) and hit a problem which I suspect is mouse-related. The first file would select and display fine. However the program would consistently crash having selected the second file.

I traced this to the musicLibrary::onChosen() method being executed twice in response to a single click. Needs investigation, but in the short term I block the second selection of the same item.

While looking into this I compared the renderThread code with the example you based it on, and made a few changes which hopefully make things more robust. (There are also some comments on other things that could maybe changed).

The changed files are attached.
Attachments
MusicalPi_mods.zip
MusicalPi updated code
(6.39 KiB) Downloaded 43 times

Linwood
Posts: 32
Joined: Sat Jun 28, 2014 2:08 am
Location: Cape Coral, Florida

Re: Music Touch Display, Calibre Integrated, Piano (MusicalP

Sun Feb 05, 2017 5:35 pm

I really appreciate the feedback.

I am still off in space trying to supplement or replace the display with a MuseScore viewer, so I have things rather torn up at present. I will get back to, and incorporate your suggestions. Incidentally I've also been caught by not knowing if the page shown was the last, so that's a good idea.

My C++ skills are ancient and reviving, and my QT skills are nascent and learning, so any advice appreciated. Don't take lack of incorporation in the next week or two as disinterest, just on a tangent.

stevend
Posts: 211
Joined: Fri Oct 11, 2013 12:28 pm

Re: Music Touch Display, Calibre Integrated, Piano (MusicalP

Sun Feb 05, 2017 10:20 pm

Linwood wrote:I really appreciate the feedback.

My C++ skills are ancient and reviving, and my QT skills are nascent and learning, so any advice appreciated. Don't take lack of incorporation in the next week or two as disinterest, just on a tangent.
No problem. My time for this is very intermittent, as well. And my C++ is mostly confined to embedded systems, and my QT skills are represented by a little dabbling a few years ago. So don't take anything I do as representing the 'best' way!

Linwood
Posts: 32
Joined: Sat Jun 28, 2014 2:08 am
Location: Cape Coral, Florida

Re: Music Touch Display, Calibre Integrated, Piano (MusicalP

Fri Feb 10, 2017 3:08 pm

Thought I would post an update.

I have spent a lot of time trying to carve out a portion of MuseScore to have midi files play with a point-of-play highlighting score showing. I have given up. I think the concept can be done, MuseScore has a fairly severable component library (libmscore) and one could could use that (with quite a lot of extra code though) to do the display. However, the more I tested Musescore itself on the pi, the less I believe it can keep up. WIth just slow, plodding pieces it does fine, but try something fast, and it is WAY too slow. Flight of the bumblebee for example, gets played so slowly as to be unrecognizable.

I also tested some javascript players, and they are WAY too slow, slower than Musescore. I think the whole issue of widget based display with highlighting and some animation is just too intensive for it to also keep up with the midi sequence play.

It's worth noting that MuseScore does not even support midi output; it plays through some other service, like Jack, which then patches up provide Midi output. This turned out to be surprisingly hard to get working, the documentation is ancient, and the split between jack and jack2 leads to conflicting instructions. Of somewhat more interest, I found a way with qmidinet (a supposedly jack related tool) to provide midi output on my hyperv guest for development, over the network, to the pi. The timing is bad on it, and it cannot keep up with fast pieces, but it vastly simplifies testing.

Now, with that said, I have another major problem: I think I am going to give up on TSE3 as a midi library. I had significant problems getting it to identify measure numbers, only to find out it has a very arcane way to represent repeats (with negative beats, e.g. bar 5 beat -16 (in 4/4) would really be bar 1, which is actually measure 2 since it's zero based. Not too big a deal in itself, but it actually gets it wrong; repeat transitions are frequently flagged at the second, not first beat of a measure.

The measure mess is not the main problem, however - it just does not work on some songs. I composed a simple test midi in musescore, and put in tempo changes. My program basically went nuts at the tempo change, skipping the middle portion (but with the clock running) and playing the last portion. So I tried TSE3PLAY, the package's own player, and it just stopped at the first tempo change. pmidi (from alsa) plays it fine.

I do not think I want to try debugging tse3 -- it's a huge package, with lots of layers and complexity. I am going to take a run at using the midi import from either pmidi or some other library, and using alsa as a sequencer for output. TSE3 may need some relatively simple fixes, but it has clearly been abandoned by the maintainer over a decade ago, and is just not worth trying to fix.

So off on another tangent.

stevend
Posts: 211
Joined: Fri Oct 11, 2013 12:28 pm

Re: Music Touch Display, Calibre Integrated, Piano (MusicalP

Sat Feb 11, 2017 2:19 pm

Sounds like you've been having fun!

I'll have to have a look at Musescore for notation - looks interesting; for me that would be the main time I'd sometimes use audio playback. Right now I'm having plenty of fun getting used to this new way of page turning. And I keep on finding things I'd like to do to help with the selection process, based on tags and maybe other fields.

Another small update to your documentation; immediately prior to setting up the screensaver etc, you need:

Code: Select all

export DISPLAY=:0

Linwood
Posts: 32
Joined: Sat Jun 28, 2014 2:08 am
Location: Cape Coral, Florida

Re: Music Touch Display, Calibre Integrated, Piano (MusicalP

Sat Feb 11, 2017 2:32 pm

Can you elaborate on what the export does? Or more precisely why it isn't already known by context?

Aside: I really think it's possible to do display of notes live while playing. Something like the javascript (e.g. http://www.verovio.org/mei-viewer.xhtml), but implemented in compiled code. I'm just not sure I have the stamina to sort though all the issues. I may come back to it, right now I just want to get the playing to actually work. I've gotten the midifile to read, I need to do my own measure number calculations though, then I need to see if I can feed it to ALSA and control it properly.

stevend
Posts: 211
Joined: Fri Oct 11, 2013 12:28 pm

Re: Music Touch Display, Calibre Integrated, Piano (MusicalP

Sat Feb 11, 2017 5:04 pm

Linwood wrote:Can you elaborate on what the export does? Or more precisely why it isn't already known by context?
I almost invariably access command line from another PC via SSH. At least in that situation, it's needed to identify the graphics screen. (I used the same method when debugging some of the problems I encountered - run MusicalPi from the command line, and then that's where all the debug and error messages go.) Maybe it's not needed if you run a console window locally.

Linwood
Posts: 32
Joined: Sat Jun 28, 2014 2:08 am
Location: Cape Coral, Florida

Re: Music Touch Display, Calibre Integrated, Piano (MusicalP

Sat Feb 11, 2017 5:12 pm

Hmmm... I use putty with X11 forwarding, and it somehow does it magically.

My hesitation is that in some circumstances I think zero is the wrong value, e.g. if I have a console and also access via ssh? Or am I thinking of this incorrectly? I really don't do x windows much, last paid attention when it was new. :shock:

stevend
Posts: 211
Joined: Fri Oct 11, 2013 12:28 pm

Re: Music Touch Display, Calibre Integrated, Piano (MusicalP

Sat Feb 11, 2017 7:04 pm

Linwood wrote:Hmmm... I use putty with X11 forwarding, and it somehow does it magically
Maybe that's the difference.
Maybe mention the export line with a caveat that it may not be necessary, or that the display number might be different (unfortunately, didn't make a note of where I found the info - IIRC there's a command which gives the display number, among other information)

Linwood
Posts: 32
Joined: Sat Jun 28, 2014 2:08 am
Location: Cape Coral, Florida

Re: Music Touch Display, Calibre Integrated, Piano (MusicalP

Sat Feb 11, 2017 7:19 pm

WIll, thanks.

stevend
Posts: 211
Joined: Fri Oct 11, 2013 12:28 pm

Re: Music Touch Display, Calibre Integrated, Piano (MusicalP

Sun Feb 12, 2017 9:31 am

Found the command that gives the display number - it's "w"

I've made some mods to tag processing, as a precursor to searching by tag.

Firstly, you can now define a string 'MUSICALPI_INSTRUMENT_LIST' in piconstants.h, with a list of tag names intended for instruments. If the string is present and non-empty, any tag in this list appears in a separate column labelled 'Instruments'. Otherwise the column doesn't appear.

Secondly, all tags are now displayed in the table (used to be just the first encountered)

Also found a couple of error messages where the wrong query name was referenced (not that I got the errors)

Next step is to put up some checkboxes and add tag-based filtering to the search function. To help this I've added a comma-separated list of tag numbers to each table entry, so that one can look for the pattern <space><number><comma>
Attachments
MusicalPi_mods_120217.zip
(6.38 KiB) Downloaded 35 times

Linwood
Posts: 32
Joined: Sat Jun 28, 2014 2:08 am
Location: Cape Coral, Florida

Re: Music Touch Display, Calibre Integrated, Piano (MusicalP

Sun Feb 12, 2017 1:40 pm

I had been thinking of this but not coding it (and haven't looked at your code yet so the answer may be in there), but I was thinking the creation of new tags (lists) would be done on the Pi side not (necessarily) Calibre? And write back to Calibre?

Or are you doing it so that one has to set them up in Calibre first?

stevend
Posts: 211
Joined: Fri Oct 11, 2013 12:28 pm

Re: Music Touch Display, Calibre Integrated, Piano (MusicalP

Sun Feb 12, 2017 2:19 pm

Linwood wrote: Or are you doing it so that one has to set them up in Calibre first?
At present it's all done in Calibre. So far I've mostly been using Calibre's 'bulk metadata edit' function for many of the tags, and I see no point in trying to replicate that elsewhere. Once I've got some more practical exerience, there may be value in adding some very specific editing functions. If I was starting with a blank sheet of paper, rather than piggybacking off existing software, I'd structure things a little differently.
But there's certainly merit in being able to assign individual pieces to custom lists within MusicalPi. I think that at least some of this would need a separate database table or two to order the list (I envisage a 'playlist' function similar to that in media players, where you just step through a number of pieces, in a pre-ordained order). It may be possible to achieve the same effect by adding an extra field to the 'Tags' table - calibre would hopefully ignore it, and MusicalPi could use it to determine the play order.

Return to “Other projects”